Before: No Trace:
INFO: DALI: : MyDebug
Now: No Trace:
INFO: DALI: MyDebug
Before: Trace:
INFO: DALI: Entr: MyFunction()
INFO: DALI: : MyDebug
INFO: DALI: Exit: MyFunction()
Now: Trace:
INFO: DALI: Entr: MyFunction()
INFO: DALI: : MyDebug
INFO: DALI: Exit: MyFunction()
Change-Id: I3a04b50154a4f23ca90cad5a7ad2ef26ae6cb1cf
va_list arg;
va_start(arg, format);
va_list arg;
va_start(arg, format);
- char *buffer = NULL;
- int numChars = asprintf(&buffer, "%-*c %s", mNesting, ':', format);
- if(numChars >= 0) // No error
- std::string message = ArgListToString(buffer, arg);
- LogMessage(DebugInfo, message.c_str());
- free(buffer);
+ char *buffer = NULL;
+ int numChars = asprintf( &buffer, " %-*c %s", mNesting, ':', format );
+ if( numChars >= 0 ) // No error
+ {
+ std::string message = ArgListToString( buffer, arg );
+ LogMessage( DebugInfo, message.c_str() );
+ free( buffer );
+ }
+ }
+ else
+ {
+ std::string message = ArgListToString( format, arg );
+ LogMessage( DebugInfo, message.c_str() );