|
1 /* |
|
2 * Copyright (c) 2004,2006 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: Logging macros |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef LOGGER_H |
|
20 #define LOGGER_H |
|
21 |
|
22 // INCLUDE FILES |
|
23 #include <e32std.h> |
|
24 #include <flogger.h> |
|
25 #include "alwaysonconfig.hrh" |
|
26 |
|
27 // CONSTANTS |
|
28 _LIT( KPath, "pdpcm2" ); |
|
29 _LIT( KFile, "AlwaysOn.txt" ); |
|
30 |
|
31 #ifdef LOGGING_ENABLED |
|
32 |
|
33 #ifdef LOGGING_MODE_FILE |
|
34 |
|
35 #define LOG_1( a )\ |
|
36 RFileLogger::Write( KPath, KFile, EFileLoggingModeAppend, a ) |
|
37 #define LOG_2( a, b )\ |
|
38 RFileLogger::WriteFormat( KPath, KFile, EFileLoggingModeAppend, a, b ) |
|
39 #define LOG_3( a, b, c )\ |
|
40 RFileLogger::WriteFormat( KPath, KFile, EFileLoggingModeAppend, a, b, c ) |
|
41 |
|
42 #else |
|
43 |
|
44 #define LOG_1( a ) RDebug::Print( a ) |
|
45 #define LOG_2( a, b ) RDebug::Print( a, b ) |
|
46 #define LOG_3( a, b, c ) RDebug::Print( a, b, c ) |
|
47 |
|
48 #endif // LOGGING_MODE_FILE |
|
49 |
|
50 #else |
|
51 |
|
52 #define LOG_1( a ) |
|
53 #define LOG_2( a, b ) |
|
54 #define LOG_3( a, b, c ) |
|
55 |
|
56 #endif // LOGGING_ENABLED |
|
57 |
|
58 #endif // LOGGER_H |