|
1 /* |
|
2 * Copyright (c) 2009 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: CMS Debug macros |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef __CMS_DEBUG_H__ |
|
19 #define __CMS_DEBUG_H__ |
|
20 |
|
21 #include <e32svr.h> |
|
22 #include <e32std.h> |
|
23 #include <f32file.h> |
|
24 |
|
25 #ifdef _DEBUG |
|
26 |
|
27 #ifdef __WINS__ |
|
28 |
|
29 #define PRINT( txt ) RDebug::Print( txt ); |
|
30 #define PRINT1( txt, arg1 ) RDebug::Print( txt, arg1 ); |
|
31 #define PRINT2( txt, arg1, arg2 ) RDebug::Print( txt, arg1, arg2 ); |
|
32 #define PRINT3( txt, arg1, arg2, arg3 ) RDebug::Print( txt, arg1, arg2,arg3 ); |
|
33 #else |
|
34 |
|
35 #include <flogger.h> |
|
36 |
|
37 _LIT(KLogDirFullName, "c:\\logs\\"); |
|
38 _LIT(KLogDir, "cmsservices"); |
|
39 _LIT(KLogFile, "cmsdebuglog.txt"); |
|
40 |
|
41 #define PRINT( txt ) RFileLogger::Write(KLogDir,KLogFile,EFileLoggingModeAppend,txt); |
|
42 #define PRINT1( txt, arg1 ) RFileLogger::WriteFormat(KLogDir,KLogFile,EFileLoggingModeAppend,TRefByValue<const TDesC>(txt),arg1); |
|
43 #define PRINT2( txt, arg1, arg2 ) RFileLogger::WriteFormat(KLogDir,KLogFile,EFileLoggingModeAppend,TRefByValue<const TDesC>(txt),arg1,arg2); |
|
44 #define PRINT3( txt, arg1, arg2, arg3 ) RFileLogger::WriteFormat(KLogDir,KLogFile,EFileLoggingModeAppend,TRefByValue<const TDesC>(txt),arg1,arg2,arg3); |
|
45 |
|
46 |
|
47 #endif // __WINS__ |
|
48 |
|
49 #else |
|
50 |
|
51 #define PRINT( txt ) |
|
52 #define PRINT1( txt, arg1 ) |
|
53 #define PRINT2( txt, arg1, arg2 ) |
|
54 #define PRINT3( txt, arg1, arg2, arg3 ) |
|
55 |
|
56 #endif // _DEBUG |
|
57 |
|
58 |
|
59 #endif // __CMS_DEBUG_H__ |
|
60 |
|
61 // End of File |