1 /* |
|
2 * Copyright (c) 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 constants definition |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef NSMLDSSYNC__DEBUG_H |
|
21 #define NSMLDSSYNC__DEBUG_H |
|
22 |
|
23 |
|
24 #ifdef _DEBUG |
|
25 |
|
26 #include <e32svr.h> |
|
27 #include <e32std.h> |
|
28 #include <f32file.h> |
|
29 #include <flogger.h> |
|
30 |
|
31 _LIT(KLogFile,"smlsync.txt"); |
|
32 _LIT(KLogDirFullName,"c:\\logs\\"); |
|
33 _LIT(KLogDir,"smlsync"); |
|
34 |
|
35 // Declare the FPrint function |
|
36 inline void FPrint(TRefByValue<const TDesC> aFmt, ...) |
|
37 { |
|
38 VA_LIST list; |
|
39 VA_START(list,aFmt); |
|
40 RFileLogger::WriteFormat(KLogDir, KLogFile, EFileLoggingModeAppend, TPtrC(aFmt), list); |
|
41 } |
|
42 |
|
43 |
|
44 //#ifdef __WINS__ // File logging for WINS |
|
45 |
|
46 //#ifndef __GNUC__ |
|
47 // #define FLOG RDebug::Print |
|
48 //#else // __GNUC__ |
|
49 // #define FLOG(arg...) RDebug::Print(arg); |
|
50 //#endif // __GNUC__ |
|
51 |
|
52 |
|
53 #ifndef __GNUC__ |
|
54 #define FLOG FPrint |
|
55 #else // __GNUC__ |
|
56 #define FLOG(arg...) FPrint(arg); |
|
57 #endif // __GNUC__ |
|
58 |
|
59 //#define FLOG FPrint |
|
60 //#define FLOG(a) { FPrint(a); } |
|
61 //#define FMTLOG(arg...) { FPrint(arg); } |
|
62 //#define FMTLOG(arg...) RDebug::Print(arg); |
|
63 |
|
64 //#define FLOG(a) { RDebug::Print(a); } |
|
65 #define FTRACE(a) { a; } |
|
66 |
|
67 //#else // RDebug logging for target HW |
|
68 |
|
69 //#define FLOG(a) { RDebug::Print(a); } |
|
70 //#define FTRACE(a) { a; } |
|
71 |
|
72 //#endif //__WINS__ |
|
73 |
|
74 |
|
75 #else // No loggings --> Reduced binary size |
|
76 |
|
77 #define FLOG(a) |
|
78 #define FTRACE(a) |
|
79 |
|
80 #endif // _DEBUG |
|
81 |
|
82 |
|
83 #endif // NSMLDSSYNC__DEBUG_H |
|
84 |
|
85 // End of File |
|