void HTML_Log::PrintMsg( Color color, char pfx, const char* source, const char* fmt, va_list ap ) { if( !m_initialized ) return; MutexLock l( mMutex ); PrintTime(); SetColor( color ); Print( " %c ", pfx ); if( source && *source ) { SetColor( COLOR_WHITE ); Print( "%s: ", source ); SetColor( color ); } PrintVa( fmt, ap ); Print( "\n" ); SetColor( COLOR_DEFAULT ); }
void SysLog::PrintMsg(Color color, char pfx, const char* source, const char* fmt, va_list ap) { if( !m_initialized ) return; MutexLock l( mMutex ); PrintTime(); SetColor( color ); Print( " %c ", pfx ); std::string pad = ""; if(strlen(source) < CONSOLE_LOG_PADDING) pad = std::string(CONSOLE_LOG_PADDING-strlen(source), ' '); if( source && *source ) { SetColor( COLOR_WHITE ); Print( "%s%s: ", pad.c_str(), source ); SetColor( color ); } PrintVa( fmt, ap ); Print( "\n" ); SetColor( COLOR_DEFAULT ); }
void HTML_Log::Print( const char* fmt, ... ) { va_list ap; va_start( ap, fmt ); PrintVa( fmt, ap ); va_end( ap ); }