I'm trying to send log messages so that I can see the output in LogCat via Eclipse. I tried it with the Android and SDL call but nothing shows up in Log Cat. I set the filter to "verbos" or "debug" but none of the information is displayed.
Is there a trick to this or am I doing something wrong.
Had to apply a fix to Eclipse so that it would show all the LogCat tabs so I do see all the info.
void CStatCounter::IncCycle( SDL_Window * m_pWindow )
{
// These counters are incremeented each game loop cycle so they can
// be placed here in this function because this function is also called
// each game loop cycle
m_elapsedFPSCounter += CHighResTimer::Instance().GetFPS();
++m_cycleCounter;
// update the stats every 500 miliseconds
if( m_statsDisplayTimer.Expired(CTimer::RESTART_ON_EXPIRE) )
{
// Show the output
#if defined(__ANDROID__)
__android_log_print(ANDROID_LOG_DEBUG, "Lap Cat Games", "%s", "Test Message");
#else
if( !CSettings::Instance().GetFullScreen() )
SDL_SetWindowTitle( m_pWindow, GetStatString().c_str() );
#endif
// Now that the stats are displayed, we can reset out counters.
ResetCounters();
}
} // HasCycleCompleted
or
void CStatCounter::IncCycle( SDL_Window * m_pWindow )
{
// These counters are incremeented each game loop cycle so they can
// be placed here in this function because this function is also called
// each game loop cycle
m_elapsedFPSCounter += CHighResTimer::Instance().GetFPS();
++m_cycleCounter;
// update the stats every 500 miliseconds
if( m_statsDisplayTimer.Expired(CTimer::RESTART_ON_EXPIRE) )
{
// Show the output
#if defined(__IPHONEOS__) || defined(__ANDROID__)
SDL_LogDebug( SDL_LOG_CATEGORY_RENDER, "%s", GetStatString().c_str() );
#else
if( !CSettings::Instance().GetFullScreen() )
SDL_SetWindowTitle( m_pWindow, GetStatString().c_str() );
#endif
// Now that the stats are displayed, we can reset out counters.
ResetCounters();
}
} // HasCycleCompleted