|
1 /* |
|
2 * Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0"" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Debug utils API |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 #ifndef PENINPUTIMEPLUGINCHSDEBUG_H |
|
30 #define PENINPUTIMEPLUGINCHSDEBUG_H |
|
31 |
|
32 #ifdef _DEBUG |
|
33 #define PRINT( txt ) RDebug::Print( txt ); |
|
34 #define PRINTF( txt ) RDebug::Print txt; |
|
35 #define PRINT1( txt, arg1 ) RDebug::Print( txt, arg1 ); |
|
36 #define PRINT2( txt, arg1, arg2 ) RDebug::Print( txt, arg1, arg2 ); |
|
37 #define PRINT3( txt, arg1, arg2, arg3 ) RDebug::Print( txt, arg1, arg2, arg3 ); |
|
38 #else |
|
39 #define PRINT( txt ) |
|
40 #define PRINTF( txt ) |
|
41 #define PRINT1( txt, arg1 ) |
|
42 #define PRINT2( txt, arg1, arg2 ) |
|
43 #define PRINT3( txt, arg1, arg2, arg3 ) |
|
44 #endif |
|
45 |
|
46 |
|
47 // Record into log files |
|
48 #define USE_FILE_LOGGER |
|
49 |
|
50 #if defined (_DEBUG) && !defined(USE_FILE_LOGGER) |
|
51 #define USE_SERIAL_LOGGER |
|
52 #endif |
|
53 |
|
54 #if defined (USE_FILE_LOGGER) |
|
55 #include <flogger.h> |
|
56 _LIT(KLogFile,"imepluginchn.txt"); |
|
57 _LIT(KLogFolder,"peninputime"); |
|
58 #define LOGTEXT(AAA) RFileLogger::Write(KLogFolder(), \ |
|
59 KLogFile(), \ |
|
60 EFileLoggingModeAppend, \ |
|
61 AAA) |
|
62 #define LOGTEXT2(AAA,BBB) RFileLogger::WriteFormat(KLogFolder(), \ |
|
63 KLogFile(), \ |
|
64 EFileLoggingModeAppend, \ |
|
65 TRefByValue<const TDesC>(AAA), \ |
|
66 BBB) |
|
67 #define LOGTEXT3(AAA,BBB,CCC) RFileLogger::WriteFormat(KLogFolder(), \ |
|
68 KLogFile(), \ |
|
69 EFileLoggingModeAppend, \ |
|
70 TRefByValue<const TDesC>(AAA), \ |
|
71 BBB, \ |
|
72 CCC) |
|
73 #define LOGHEXDUMP(AAA,BBB,CCC,DDD) RFileLogger::HexDump(KLogFolder(), \ |
|
74 KLogFile(), \ |
|
75 EFileLoggingModeAppend, \ |
|
76 AAA,\ |
|
77 BBB,\ |
|
78 CCC,\ |
|
79 DDD) |
|
80 #elif defined (USE_SERIAL_LOGGER) |
|
81 #include <e32svr.h> |
|
82 #define LOGTEXT(AAA) RDebug::Print(AAA) |
|
83 #define LOGTEXT2(AAA,BBB) RDebug::Print(AAA,BBB) |
|
84 #define LOGTEXT3(AAA,BBB,CCC) RDebug::Print(AAA,BBB,CCC) |
|
85 #define LOGHEXDUMP(AAA,BBB,CCC,DDD) |
|
86 #else |
|
87 #define LOGTEXT(AAA) |
|
88 #define LOGTEXT2(AAA,BBB) |
|
89 #define LOGTEXT3(AAA,BBB,CCC) |
|
90 #define LOGHEXDUMP(AAA,BBB,CCC,DDD) |
|
91 #endif |
|
92 |
|
93 #endif // PENINPUTIMEPLUGINCHSDEBUG |
|
94 |
|
95 // End Of File |