46 m_message(
"" ), m_source(
"UNKNOWN" ), m_format( DEFAULT_FORMAT ),
47 m_time_format(DEFAULT_TIME_FORMAT), m_type(
NIL ),
48 m_fill(
' ' ), m_width( 0 ), m_left( true )
59 m_message( msg ), m_source( src ), m_format( DEFAULT_FORMAT ),
60 m_time_format(DEFAULT_TIME_FORMAT), m_type( type ),
61 m_fill(
' ' ), m_width( 0 ), m_left( true )
72 m_message( msg ), m_source( src ), m_format( DEFAULT_FORMAT ),
73 m_time_format(DEFAULT_TIME_FORMAT), m_type( type ),
74 m_fill(
' ' ), m_width( 0 ), m_left( true )
215 if ( format.empty() )
253 if ( timeFormat.empty() )
269 while( i != format.end() ) {
276 if ( i == format.end() )
break;
289 if ( i == format.end() ) {
307 if ( ! format.empty() ) {
308 const char FORMAT_TYPE = format[ format.length() - 1 ];
313 switch( FORMAT_TYPE ) {
315 if ( FORMAT_PARAM.length() == 1 ) {
346 #define SET(x) case x: level=#x; break
354 case ALWAYS: level=
"SUCCESS";
break;
396 bool only_digits =
true;
398 i != formatArg.end();
i++ ) {
410 m_width = atoi( formatArg.c_str() );
412 m_width = atoi( formatArg.data() );
427 if (
m_width == 0 ||
m_width == static_cast<int>( text.length() ) ) {
433 if (
m_width < static_cast<int>( text.length() ) ) {
435 for (
int i = 0, j = newText.length()-1; i < 3 && j >= 0;
i++, j-- )
443 newText.replace( newText.begin(), newText.begin() + text.length(),
444 text.begin(), text.end() );
446 newText.replace( newText.end() - text.length(), newText.end(),
447 text.begin(), text.end() );