|
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: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef FILEBROWSER_TRACES_H |
|
20 #define FILEBROWSER_TRACES_H |
|
21 |
|
22 #include <e32def.h> |
|
23 |
|
24 |
|
25 // --------------------------------------------------------------------------- |
|
26 // You can change these logging method values below! Recompile the application to take changes effect. |
|
27 |
|
28 // logging methods |
|
29 // 0 = No logging |
|
30 // 1 = Flogger |
|
31 // 2 = RDebug |
|
32 // 3 = Flogger and RDebug |
|
33 |
|
34 #ifndef _DEBUG |
|
35 |
|
36 // Logging method for UREL/release builds: |
|
37 #define FILEBROWSER_LOGGING_METHOD 0 |
|
38 |
|
39 #else |
|
40 |
|
41 // Logging method for UDEB/debug builds: |
|
42 #define FILEBROWSER_LOGGING_METHOD 2 |
|
43 |
|
44 #endif |
|
45 |
|
46 |
|
47 |
|
48 // --------------------------------------------------------------------------- |
|
49 // Do not make any changes to lines below... |
|
50 |
|
51 #if FILEBROWSER_LOGGING_METHOD == 1 || FILEBROWSER_LOGGING_METHOD == 3 |
|
52 |
|
53 #include <flogger.h> |
|
54 _LIT(KLogFolder,"Launcher"); |
|
55 _LIT(KLogFile,"Launcher_Trace.txt"); |
|
56 |
|
57 #endif |
|
58 |
|
59 #if FILEBROWSER_LOGGING_METHOD == 2 || FILEBROWSER_LOGGING_METHOD == 3 |
|
60 |
|
61 #include <e32debug.h> |
|
62 |
|
63 #endif |
|
64 |
|
65 |
|
66 #if FILEBROWSER_LOGGING_METHOD == 0 |
|
67 |
|
68 #define LOGTEXT(AAA) |
|
69 #define LOGSTRING(AAA) |
|
70 #define LOGSTRING2(AAA,BBB) |
|
71 #define LOGSTRING3(AAA,BBB,CCC) |
|
72 #define LOGSTRING4(AAA,BBB,CCC,DDD) |
|
73 |
|
74 |
|
75 #elif FILEBROWSER_LOGGING_METHOD == 1 |
|
76 |
|
77 #define LOGTEXT(AAA) RFileLogger::Write(KLogFolder(),KLogFile(),EFileLoggingModeAppend, AAA) |
|
78 #define LOGSTRING(AAA) do { _LIT(tempLogDes,AAA); RFileLogger::Write(KLogFolder(),KLogFile(),EFileLoggingModeAppend,tempLogDes()); } while (0) |
|
79 #define LOGSTRING2(AAA,BBB) do { _LIT(tempLogDes,AAA); RFileLogger::WriteFormat(KLogFolder(),KLogFile(),EFileLoggingModeAppend,TRefByValue<const TDesC>(tempLogDes()),BBB); } while (0) |
|
80 #define LOGSTRING3(AAA,BBB,CCC) do { _LIT(tempLogDes,AAA); RFileLogger::WriteFormat(KLogFolder(),KLogFile(),EFileLoggingModeAppend,TRefByValue<const TDesC>(tempLogDes()),BBB,CCC); } while (0) |
|
81 #define LOGSTRING4(AAA,BBB,CCC,DDD) do { _LIT(tempLogDes,AAA); RFileLogger::WriteFormat(KLogFolder(),KLogFile(),EFileLoggingModeAppend,TRefByValue<const TDesC>(tempLogDes()),BBB,CCC,DDD); } while (0) |
|
82 |
|
83 #elif FILEBROWSER_LOGGING_METHOD == 2 |
|
84 |
|
85 #define LOGTEXT(AAA) RDebug::Print(AAA) |
|
86 #define LOGSTRING(AAA) do { _LIT(tempLogDes,AAA); RDebug::Print(tempLogDes); } while (0) |
|
87 #define LOGSTRING2(AAA,BBB) do { _LIT(tempLogDes,AAA); RDebug::Print(tempLogDes, BBB); } while (0) |
|
88 #define LOGSTRING3(AAA,BBB,CCC) do { _LIT(tempLogDes,AAA); RDebug::Print(tempLogDes, BBB, CCC); } while (0) |
|
89 #define LOGSTRING4(AAA,BBB,CCC,DDD) do { _LIT(tempLogDes,AAA); RDebug::Print(tempLogDes, BBB, CCC, DDD); } while (0) |
|
90 |
|
91 #elif FILEBROWSER_LOGGING_METHOD == 3 |
|
92 |
|
93 #define LOGTEXT(AAA) RDebug::Print(AAA); RFileLogger::Write(KLogFolder(),KLogFile(),EFileLoggingModeAppend, AAA) |
|
94 #define LOGSTRING(AAA) do { _LIT(tempLogDes,AAA); RDebug::Print(tempLogDes); RFileLogger::Write(KLogFolder(),KLogFile(),EFileLoggingModeAppend,tempLogDes()); } while (0) |
|
95 #define LOGSTRING2(AAA,BBB) do { _LIT(tempLogDes,AAA); RDebug::Print(tempLogDes, BBB); RFileLogger::WriteFormat(KLogFolder(),KLogFile(),EFileLoggingModeAppend,TRefByValue<const TDesC>(tempLogDes()),BBB); } while (0) |
|
96 #define LOGSTRING3(AAA,BBB,CCC) do { _LIT(tempLogDes,AAA); RDebug::Print(tempLogDes, BBB, CCC); RFileLogger::WriteFormat(KLogFolder(),KLogFile(),EFileLoggingModeAppend,TRefByValue<const TDesC>(tempLogDes()),BBB,CCC); } while (0) |
|
97 #define LOGSTRING4(AAA,BBB,CCC,DDD) do { _LIT(tempLogDes,AAA); RDebug::Print(tempLogDes, BBB, CCC, DDD); RFileLogger::WriteFormat(KLogFolder(),KLogFile(),EFileLoggingModeAppend,TRefByValue<const TDesC>(tempLogDes()),BBB,CCC,DDD); } while (0) |
|
98 |
|
99 #endif |
|
100 |
|
101 // --------------------------------------------------------------------------- |
|
102 |
|
103 #endif |