imstutils/imconnectionprovider/inc/icplogger.h
branchRCL_3
changeset 13 76f25fb7a6a1
parent 0 5e5d6b214f4f
equal deleted inserted replaced
12:36d367c62acb 13:76f25fb7a6a1
    18 
    18 
    19 
    19 
    20 #ifndef __ICPLOGGER_H__
    20 #ifndef __ICPLOGGER_H__
    21 #define __ICPLOGGER_H__
    21 #define __ICPLOGGER_H__
    22 
    22 
       
    23 #ifdef __WINS__
       
    24  #ifdef _DEBUG
       
    25     #define ICP_ENABLE_DEBUG_LOGS // for WINS UDEB
       
    26  #endif
       
    27 #else
       
    28  #ifdef _DEBUG     
       
    29     #define ICP_ENABLE_DEBUG_LOGS // for device UDEB
       
    30  #endif
       
    31 #endif
    23 #define SCP_TP_PRINT(s) L##s
    32 #define SCP_TP_PRINT(s) L##s
    24 #define SCP_STRA_PRINT(s) SCP_TP_PRINT(s)
    33 #define SCP_STRA_PRINT(s) SCP_TP_PRINT(s)
    25 #define SCP_STR_PRINT(t) SCP_STRA_PRINT("[SCP]") L##t
    34 #define SCP_STR_PRINT(t) SCP_STRA_PRINT("[SCP]") L##t
    26 #define SCP_LIT_PRINT(s) TPtrC((const TText *) SCP_STR_PRINT(s))
    35 #define SCP_LIT_PRINT(s) TPtrC((const TText *) SCP_STR_PRINT(s))
    27 #define SCP_LIT_CONVERT(s) TPtrC((const TText *)(s))
    36 #define SCP_LIT_CONVERT(s) TPtrC((const TText *)(s))
   101 
   110 
   102 #include <flogger.h>
   111 #include <flogger.h>
   103 
   112 
   104 inline void IcpDebugWriteFormat(TRefByValue<const TDesC> aFmt,...)
   113 inline void IcpDebugWriteFormat(TRefByValue<const TDesC> aFmt,...)
   105     {
   114     {
       
   115 #ifdef ICP_ENABLE_DEBUG_LOGS
   106     _LIT(KDir, "icp");
   116     _LIT(KDir, "icp");
   107     _LIT(KName, "icp.log");
   117     _LIT(KName, "icp.log");
   108 
   118 
   109     // take the ellipsis parameters
   119     // take the ellipsis parameters
   110     VA_LIST args;
   120     VA_LIST args;
   111     VA_START(args,aFmt);
   121     VA_START(args,aFmt);
   112     RFileLogger::WriteFormat(KDir, KName, EFileLoggingModeAppend, aFmt, args);
   122     RFileLogger::WriteFormat(KDir, KName, EFileLoggingModeAppend, aFmt, args);
   113     VA_END(args);
   123     VA_END(args);
       
   124 #endif
   114     }
   125     }
   115 
   126 
   116 #endif  // __SCPLOGGER_H__
   127 #endif  // __SCPLOGGER_H__