Exemple #1
0
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 );
}
Exemple #2
0
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 );
}
Exemple #3
0
void HTML_Log::Print( const char* fmt, ... )
{
    va_list ap;
    va_start( ap, fmt );

    PrintVa( fmt, ap );

    va_end( ap );
}