22 #include <e32std.h> |
22 #include <e32std.h> |
23 #include <badesca.h> |
23 #include <badesca.h> |
24 #include <f32file.h> |
24 #include <f32file.h> |
25 |
25 |
26 |
26 |
|
27 //============================================================================== |
|
28 // winscw udeb |
|
29 //------------------------------------------------------------------------------ |
|
30 |
|
31 #ifdef __WINS__ |
27 #ifdef _DEBUG |
32 #ifdef _DEBUG |
28 |
33 |
29 #ifdef __WINS__ |
|
30 #define PRINT( txt ) \ |
34 #define PRINT( txt ) \ |
31 { TBuf<512> __buf; __buf.Format(txt); RDebug::Print( _L("[PCS] %S"), &__buf ); } |
35 { TBuf<512> __buf; __buf.Format(txt); RDebug::Print( _L("[PCS] %S"), &__buf ); } |
32 #define PRINT1( txt, arg1 ) \ |
36 #define PRINT1( txt, arg1 ) \ |
33 { TBuf<512> __buf; __buf.Format(txt,arg1); RDebug::Print( _L("[PCS] %S"), &__buf ); } |
37 { TBuf<512> __buf; __buf.Format(txt,arg1); RDebug::Print( _L("[PCS] %S"), &__buf ); } |
34 #define PRINT2( txt, arg1, arg2 ) \ |
38 #define PRINT2( txt, arg1, arg2 ) \ |
35 { TBuf<512> __buf; __buf.Format(txt,arg1,arg2); RDebug::Print( _L("[PCS] %S"), &__buf ); } |
39 { TBuf<512> __buf; __buf.Format(txt,arg1,arg2); RDebug::Print( _L("[PCS] %S"), &__buf ); } |
36 #define PRINT3( txt, arg1, arg2, arg3 ) \ |
40 #define PRINT3( txt, arg1, arg2, arg3 ) \ |
37 { TBuf<512> __buf; __buf.Format(txt,arg1,arg2,arg3); RDebug::Print( _L("[PCS] %S"), &__buf ); } |
41 { TBuf<512> __buf; __buf.Format(txt,arg1,arg2,arg3); RDebug::Print( _L("[PCS] %S"), &__buf ); } |
38 #define PRINT4( txt, arg1, arg2, arg3, arg4 ) \ |
42 #define PRINT4( txt, arg1, arg2, arg3, arg4 ) \ |
39 { TBuf<512> __buf; __buf.Format(txt, arg1,arg2,arg3,arg4); RDebug::Print( _L("[PCS] %S"), &__buf ); } |
43 { TBuf<512> __buf; __buf.Format(txt, arg1,arg2,arg3,arg4); RDebug::Print( _L("[PCS] %S"), &__buf ); } |
40 #define PRINT5( txt, arg1, arg2, arg3, arg4, arg5 ) \ |
44 #define PRINT5( txt, arg1, arg2, arg3, arg4, arg5 ) \ |
41 { TBuf<512> __buf; __buf.Format(txt,arg1,arg2,arg3,arg4,arg5); RDebug::Print( _L("[PCS] %S"), &__buf ); } |
45 { TBuf<512> __buf; __buf.Format(txt,arg1,arg2,arg3,arg4,arg5); RDebug::Print( _L("[PCS] %S"), &__buf ); } |
|
46 #define PRINT_BOOT_PERFORMANCE( txt ) |
|
47 #define PRINT1_BOOT_PERFORMANCE( txt, arg1 ) |
42 |
48 |
43 #else |
49 #endif // _DEBUG |
|
50 #endif // __WINS__ |
|
51 |
|
52 //============================================================================== |
|
53 // armv5 udeb |
|
54 //------------------------------------------------------------------------------ |
|
55 |
|
56 #ifndef __WINS__ |
|
57 #ifdef _DEBUG |
44 |
58 |
45 #include <flogger.h> |
59 #include <flogger.h> |
46 |
60 |
47 _LIT(KLogDirFullName, "c:\\logs\\"); |
61 _LIT(KLogDirFullName, "c:\\logs\\"); |
48 _LIT(KLogDir, "Pcs"); |
62 _LIT(KLogDir, "Pcs"); |
49 _LIT(KLogFile, "PcsServer.txt"); |
63 _LIT(KLogFile, "PcsServer.txt"); |
|
64 |
|
65 //#define __BOOT_PERFORMANCE |
|
66 #ifdef __BOOT_PERFORMANCE // Boot Peformance logs only |
|
67 |
|
68 #define PRINT( txt ) |
|
69 #define PRINT1( txt, arg1 ) |
|
70 #define PRINT2( txt, arg1, arg2 ) |
|
71 #define PRINT3( txt, arg1, arg2, arg3 ) |
|
72 #define PRINT4( txt, arg1, arg2, arg3, arg4 ) |
|
73 #define PRINT5( txt, arg1, arg2, arg3, arg4, arg5 ) |
|
74 #define PRINT_BOOT_PERFORMANCE( txt ) \ |
|
75 RFileLogger::Write(KLogDir,KLogFile,EFileLoggingModeAppend,txt); |
|
76 #define PRINT1_BOOT_PERFORMANCE( txt, arg1 ) \ |
|
77 RFileLogger::WriteFormat(KLogDir,KLogFile,EFileLoggingModeAppend,TRefByValue<const TDesC>(txt),arg1); |
|
78 |
|
79 #else |
50 |
80 |
51 #define PRINT( txt ) \ |
81 #define PRINT( txt ) \ |
52 RFileLogger::Write(KLogDir,KLogFile,EFileLoggingModeAppend,txt); |
82 RFileLogger::Write(KLogDir,KLogFile,EFileLoggingModeAppend,txt); |
53 #define PRINT1( txt, arg1 ) \ |
83 #define PRINT1( txt, arg1 ) \ |
54 RFileLogger::WriteFormat(KLogDir,KLogFile,EFileLoggingModeAppend,TRefByValue<const TDesC>(txt),arg1); |
84 RFileLogger::WriteFormat(KLogDir,KLogFile,EFileLoggingModeAppend,TRefByValue<const TDesC>(txt),arg1); |
58 RFileLogger::WriteFormat(KLogDir,KLogFile,EFileLoggingModeAppend,TRefByValue<const TDesC>(txt),arg1,arg2,arg3); |
88 RFileLogger::WriteFormat(KLogDir,KLogFile,EFileLoggingModeAppend,TRefByValue<const TDesC>(txt),arg1,arg2,arg3); |
59 #define PRINT4( txt, arg1, arg2, arg3, arg4 ) \ |
89 #define PRINT4( txt, arg1, arg2, arg3, arg4 ) \ |
60 RFileLogger::WriteFormat(KLogDir,KLogFile,EFileLoggingModeAppend,TRefByValue<const TDesC>(txt),arg1,arg2,arg3,arg4); |
90 RFileLogger::WriteFormat(KLogDir,KLogFile,EFileLoggingModeAppend,TRefByValue<const TDesC>(txt),arg1,arg2,arg3,arg4); |
61 #define PRINT5( txt, arg1, arg2, arg3, arg4, arg5 ) \ |
91 #define PRINT5( txt, arg1, arg2, arg3, arg4, arg5 ) \ |
62 RFileLogger::WriteFormat(KLogDir,KLogFile,EFileLoggingModeAppend,TRefByValue<const TDesC>(txt),arg1,arg2,arg3,arg4,arg5); |
92 RFileLogger::WriteFormat(KLogDir,KLogFile,EFileLoggingModeAppend,TRefByValue<const TDesC>(txt),arg1,arg2,arg3,arg4,arg5); |
|
93 #define PRINT_BOOT_PERFORMANCE( txt ) |
|
94 #define PRINT1_BOOT_PERFORMANCE( txt, arg1 ) |
|
95 |
|
96 #endif // __BOOT_PERFORMANCE |
63 |
97 |
64 #endif // __WINS__ |
98 #endif // __WINS__ |
|
99 #endif // _DEBUG |
65 |
100 |
66 #else |
101 //============================================================================== |
|
102 // winscw urel AND armv5 urel |
|
103 //------------------------------------------------------------------------------ |
|
104 |
|
105 #ifndef _DEBUG |
67 |
106 |
68 #define PRINT( txt ) |
107 #define PRINT( txt ) |
69 #define PRINT1( txt, arg1 ) |
108 #define PRINT1( txt, arg1 ) |
70 #define PRINT2( txt, arg1, arg2 ) |
109 #define PRINT2( txt, arg1, arg2 ) |
71 #define PRINT3( txt, arg1, arg2, arg3 ) |
110 #define PRINT3( txt, arg1, arg2, arg3 ) |
72 #define PRINT4( txt, arg1, arg2, arg3, arg4 ) |
111 #define PRINT4( txt, arg1, arg2, arg3, arg4 ) |
73 #define PRINT5( txt, arg1, arg2, arg3, arg4, arg5 ) |
112 #define PRINT5( txt, arg1, arg2, arg3, arg4, arg5 ) |
|
113 #define PRINT_BOOT_PERFORMANCE( txt ) |
|
114 #define PRINT1_BOOT_PERFORMANCE( txt, arg1 ) |
74 |
115 |
75 #endif // _DEBUG |
116 #endif // _DEBUG |
76 |
117 |
|
118 //============================================================================== |
|
119 |
|
120 |
77 #ifdef _DEBUG |
121 #ifdef _DEBUG |
78 |
|
79 #define PRINTQUERY( txt, queryArg ) CPcsDebug::PrintQueryL(txt, queryArg); |
122 #define PRINTQUERY( txt, queryArg ) CPcsDebug::PrintQueryL(txt, queryArg); |
80 #define PRINTQUERYLIST( txt, queryListArg ) CPcsDebug::PrintQueryListL(txt, queryListArg); |
123 #define PRINTQUERYLIST( txt, queryListArg ) CPcsDebug::PrintQueryListL(txt, queryListArg); |
81 #define PRINTMATCHLOC( txt, matchLocsArg ) CPcsDebug::PrintMatchLoc(txt, matchLocsArg); |
124 #define PRINTMATCHLOC( txt, matchLocsArg ) CPcsDebug::PrintMatchLoc(txt, matchLocsArg); |
82 #define PRINTMATCHSET( txt, matchSetArg ) CPcsDebug::PrintMatchSet(txt, matchSetArg); |
125 #define PRINTMATCHSET( txt, matchSetArg ) CPcsDebug::PrintMatchSet(txt, matchSetArg); |
83 |
|
84 #else |
126 #else |
85 |
|
86 #define PRINTQUERY( txt, queryArg ) |
127 #define PRINTQUERY( txt, queryArg ) |
87 #define PRINTQUERYLIST( txt, queryListArg ) |
128 #define PRINTQUERYLIST( txt, queryListArg ) |
88 #define PRINTMATCHLOC( txt, matchLocsArg ) |
129 #define PRINTMATCHLOC( txt, matchLocsArg ) |
89 #define PRINTMATCHSET( txt, matchSetArg ) |
130 #define PRINTMATCHSET( txt, matchSetArg ) |
90 |
|
91 #endif // _DEBUG |
131 #endif // _DEBUG |
92 |
132 |
93 #define __LATENCY_MARK( str ) CPcsDebugWrapper::__LatencyMarkStartL(str); |
133 #define __LATENCY_MARK( str ) CPcsDebugWrapper::__LatencyMarkStartL(str); |
94 #define __LATENCY_MARKEND( str ) CPcsDebugWrapper::__LatencyMarkEnd(str); |
134 #define __LATENCY_MARKEND( str ) CPcsDebugWrapper::__LatencyMarkEnd(str); |
95 |
135 |