|
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: This file contains logging macros for test engine. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef LOGGINGDEFS_H |
|
19 #define LOGGINGDEFS_H |
|
20 |
|
21 // INCLUDES |
|
22 #include <e32std.h> |
|
23 #include <e32base.h> |
|
24 |
|
25 // CONSTANTS |
|
26 const TUint KError = 0x1; |
|
27 const TUint KInit = 0x2; |
|
28 const TUint KVerbose = 0x4; |
|
29 const TUint KAlways = 0xFFFFFFFF; |
|
30 const TUint KDebugLevel = ( KInit | KError ); |
|
31 |
|
32 // MACROS |
|
33 #define __TRACING_ENABLED |
|
34 |
|
35 // Define USE_LOGGER to use logger for logging |
|
36 #define USE_LOGGER |
|
37 |
|
38 #ifdef __TRACING_ENABLED |
|
39 |
|
40 // Disable conditional expression is constant -warning |
|
41 #pragma warning( disable : 4127 ) |
|
42 |
|
43 // Using logger |
|
44 #if defined (USE_LOGGER) |
|
45 #define __TRACE(level,p) if ( (level) & KDebugLevel) { LOGGER->Log p; } |
|
46 #else |
|
47 #define __TRACE(level,p); |
|
48 #endif |
|
49 |
|
50 #define __RDEBUG(x) if( KVerbose & KDebugLevel){ RDebug::Print x ; } |
|
51 |
|
52 #else |
|
53 // No tracing |
|
54 #define __TRACE(level,p); |
|
55 |
|
56 #define __RDEBUG(x) |
|
57 |
|
58 #endif |
|
59 |
|
60 // DATA TYPES |
|
61 |
|
62 // FUNCTION PROTOTYPES |
|
63 |
|
64 // FORWARD DECLARATIONS |
|
65 |
|
66 // CLASS DECLARATION |
|
67 |
|
68 #endif // LOGGINGDEFS_H |
|
69 |
|
70 // End of File |