emailservices/emaildebug/inc/emailtrace.h
branchRCL_3
changeset 8 e1b6206813b4
parent 0 8466d47a6819
child 63 d189ee25cf9d
equal deleted inserted replaced
4:e7aa27f58ae1 8:e1b6206813b4
   345 // Timestamp trace macros
   345 // Timestamp trace macros
   346 //-----------------------------------------------------------------------------
   346 //-----------------------------------------------------------------------------
   347 //
   347 //
   348 #if defined(TIMESTAMP_TRAC)
   348 #if defined(TIMESTAMP_TRAC)
   349 
   349 
   350     #if defined(TRACE_INTO_FIL)
   350     #if defined(TRACE_INTO_FILE)
   351 
   351 
   352         #define TIMESTAMP( aCaption )\
   352         #define TIMESTAMP( aCaption )\
   353             {\
   353             {\
   354             TTime t;\
   354             TTime t;\
   355             t.HomeTime();\
   355             t.HomeTime();\
   356             TDateTime dt = t.DateTime();\
   356             TDateTime dt = t.DateTime();\
   357             _LIT( KMsg, aCaption );\
   357             _LIT( KMsg, aCaption );\
   358             _LIT( KFormat, "[TIMESTAMP] %S %d:%02d:%02d.%d us");\
   358             _LIT( KFormat, "[TIMESTAMP] %d:%02d:%02d.%06d us %S");\
   359             RFileLogger::WriteFormat(  KEmailDir,  KEmailTraceFile, EFileLoggingModeAppend, KFormat,\
   359             RFileLogger::WriteFormat(  KEmailDir,  KEmailTraceFile, EFileLoggingModeAppend, KFormat,\
   360                 &KMsg, dt.Hour(), dt.Minute(), dt.Second(), dt.MicroSecond() );\
   360                 dt.Hour(), dt.Minute(), dt.Second(), dt.MicroSecond(), &KMsg );\
   361             }
   361             }
   362 
   362 
   363     #else//TRACE_INTO_FILE not defined
   363     #else//TRACE_INTO_FILE not defined
   364 
   364 
   365         #define TIMESTAMP( aCaption )\
   365         #define TIMESTAMP( aCaption )\
   366             {\
   366             {\
   367             TTime t;\
   367             TTime t;\
   368             t.HomeTime();\
   368             t.HomeTime();\
   369             TDateTime dt = t.DateTime();\
   369             TDateTime dt = t.DateTime();\
   370             _LIT( KMsg, aCaption );\
   370             _LIT( KMsg, aCaption );\
   371             _LIT( KFormat, "[TIMESTAMP] %S %d:%02d:%02d.%d us");\
   371             _LIT( KFormat, "[TIMESTAMP] %d:%02d:%02d.%06d us %S");\
   372             RDebug::Print( KFormat,\
   372             RDebug::Print( KFormat,\
   373                 &KMsg, dt.Hour(), dt.Minute(), dt.Second(), dt.MicroSecond() );\
   373                 dt.Hour(), dt.Minute(), dt.Second(), dt.MicroSecond(), &KMsg );\
   374             }
   374             }
   375 
   375 
   376     #endif//TRACE_INTO_FILE
   376     #endif//TRACE_INTO_FILE
   377 
   377 
   378 #else//TIMESTAMP_TRACE not defined
   378 #else//TIMESTAMP_TRACE not defined