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: This file defines logging macros for SyncML notifiers |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef SMLNOTIFIER_DEBUG_H |
|
20 #define SMLNOTIFIER_DEBUG_H |
|
21 |
|
22 |
|
23 #ifdef _DEBUG |
|
24 |
|
25 #include <e32svr.h> |
|
26 #include <e32std.h> |
|
27 #include <f32file.h> |
|
28 #include <flogger.h> |
|
29 |
|
30 _LIT( KLogFile,"sml_notiflog.txt" ); |
|
31 _LIT( KLogDirFullName,"c:\\logs\\SyncML\\" ); |
|
32 _LIT( KLogDir,"SyncML" ); |
|
33 |
|
34 // =========================================================================== |
|
35 #ifdef __WINS__ // File logging for WINS |
|
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, |
|
43 KLogFile, |
|
44 EFileLoggingModeAppend, |
|
45 aFmt, |
|
46 list ); |
|
47 } |
|
48 |
|
49 #define FLOG( a ) { FPrint( a ); } |
|
50 #define FTRACE( a ) { a; } |
|
51 |
|
52 // =========================================================================== |
|
53 #else // RDebug logging for target HW |
|
54 // =========================================================================== |
|
55 |
|
56 // Declare the FPrint function |
|
57 inline void FPrint( const TRefByValue<const TDesC> aFmt, ... ) |
|
58 { |
|
59 VA_LIST list; |
|
60 VA_START(list,aFmt); |
|
61 TInt tmpInt = VA_ARG(list, TInt); |
|
62 TInt tmpInt2 = VA_ARG(list, TInt); |
|
63 TInt tmpInt3 = VA_ARG(list, TInt); |
|
64 TInt tmpInt4 = VA_ARG(list, TInt); |
|
65 TInt tmpInt5 = VA_ARG(list, TInt); |
|
66 TInt tmpInt6 = VA_ARG(list, TInt); |
|
67 TInt tmpInt7 = VA_ARG(list, TInt); |
|
68 TInt tmpInt8 = VA_ARG(list, TInt); |
|
69 VA_END(list); |
|
70 RDebug::Print(aFmt, tmpInt, tmpInt2, tmpInt3, tmpInt4, tmpInt5, tmpInt6, tmpInt7, tmpInt8); |
|
71 } |
|
72 |
|
73 #define FLOG( a ) { RDebug::Print(a); } |
|
74 #define FTRACE( a ) { a; } |
|
75 #endif //__WINS__ |
|
76 |
|
77 // =========================================================================== |
|
78 #else // // No loggings --> Reduced binary size |
|
79 // =========================================================================== |
|
80 #define FLOG( a ) |
|
81 #define FTRACE( a ) |
|
82 |
|
83 #endif // _DEBUG |
|
84 |
|
85 |
|
86 #endif // SMLNOTIFIER_DEBUG_H |
|
87 |
|
88 // End of File |
|