|
1 /* |
|
2 * Copyright (c) 2007-2008 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: This file contains debug macros |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef IAUPDATEDEBUG_H |
|
21 #define IAUPDATEDEBUG_H |
|
22 |
|
23 |
|
24 #ifdef _DEBUG |
|
25 |
|
26 #define IAUPDATE_FILELOG //To file log |
|
27 |
|
28 // output is c:\logs\iaupdate\iaupdate.txt |
|
29 // c:\logs\iaupdate folder must be created (manually) first |
|
30 #ifdef IAUPDATE_FILELOG //file logs |
|
31 #include <flogger.h> |
|
32 |
|
33 _LIT(KLogFilename,"iaupdate.txt"); |
|
34 _LIT(KLogDirFullName,"c:\\logs\\"); |
|
35 _LIT(KLogDir,"iaupdate"); |
|
36 |
|
37 // Declare the FPrint function |
|
38 inline void FPrint(const TRefByValue<const TDesC> aFmt, ...) |
|
39 { |
|
40 VA_LIST list; |
|
41 VA_START(list,aFmt); |
|
42 RFileLogger::WriteFormat(KLogDir, KLogFilename, EFileLoggingModeAppend, aFmt, list); |
|
43 } |
|
44 |
|
45 #define IAUPDATE_TRACE(aText) { FPrint(_L(aText)); } |
|
46 #define IAUPDATE_TRACE_1(aText,p1) { FPrint(_L(aText),p1); } |
|
47 #define IAUPDATE_TRACE_2(aText,p1,p2) { FPrint(_L(aText),p1,p2); } |
|
48 #define IAUPDATE_TRACE_3(aText,p1,p2,p3) { FPrint(_L(aText),p1,p2,p3); } |
|
49 |
|
50 #else //RDebug logs |
|
51 #include <e32debug.h> |
|
52 // output is RDebug port (epocwind.out in emulator) |
|
53 #define IAUPDATE_TRACE(aText) { RDebug::Print(_L(aText)); } |
|
54 #define IAUPDATE_TRACE_1(aText,p1) { RDebug::Print(_L(aText),p1); } |
|
55 #define IAUPDATE_TRACE_2(aText,p1,p2) { RDebug::Print(_L(aText),p1,p2); } |
|
56 #define IAUPDATE_TRACE_3(aText,p1,p2,p3) { RDebug::Print(_L(aText),p1,p2,p3); } |
|
57 #endif //IAUPDATE_FILELOG |
|
58 |
|
59 #else // No loggings |
|
60 |
|
61 #define IAUPDATE_TRACE(aText) |
|
62 #define IAUPDATE_TRACE_1(aText,p1) |
|
63 #define IAUPDATE_TRACE_2(aText,p1,p2) |
|
64 #define IAUPDATE_TRACE_3(aText,p1,p2,p3) |
|
65 |
|
66 #endif // _DEBUG |
|
67 |
|
68 #endif // IAUPDATEDEBUG_H |
|
69 |
|
70 // End of File |