|
1 /* |
|
2 * Copyright (c) 2006-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: Common trace-information file. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef LOCATIONMANAGERDEBUG_H |
|
19 #define LOCATIONMANAGERDEBUG_H |
|
20 |
|
21 /** |
|
22 * Usage: LOG(_L("[MODULE_NAME]\t Trace text here")); |
|
23 * TRACE(Print(_L("[MODULE_NAME]\t Trace text here with parameter %d"), iCount)); |
|
24 * |
|
25 * Trace target can be changed below (file logging needs directory c:\logs\upnp) |
|
26 * #define __CLOGGING -row uncommented = Console logging |
|
27 */ |
|
28 |
|
29 // undefine for sure |
|
30 #undef __CLOGGING__ |
|
31 |
|
32 // Uncomment this to get memory allocation prints from module |
|
33 //#define MEMORY_PRINT |
|
34 #ifdef _DEBUG |
|
35 // Define one of these flags: |
|
36 // CLOGGING = Console logging |
|
37 #define __CLOGGING__ |
|
38 #endif |
|
39 |
|
40 |
|
41 |
|
42 // Then actual definitions depending on the |
|
43 // flag values. |
|
44 |
|
45 #ifdef _DEBUG |
|
46 |
|
47 #include <e32std.h> |
|
48 |
|
49 #include <f32file.h> |
|
50 |
|
51 // Define the top level macros |
|
52 #ifdef MEMORY_PRINT |
|
53 #define LOG(a) {PRINTLOG(a); MemPrint();} |
|
54 #define LOG1(a,b) {PRINTLOG1(a,b); MemPrint();} |
|
55 #define TRACE(a) {a; MemPrint();} |
|
56 #else |
|
57 #define LOG(a) {PRINTLOG(a);} |
|
58 #define LOG1(a,b) {PRINTLOG1(a,b);} |
|
59 #define TRACE(a) {a;} |
|
60 #endif |
|
61 |
|
62 inline void MemPrint(); |
|
63 |
|
64 // Console Logging on |
|
65 #define PRINTLOG(a) RDebug::Print(_L(a)) |
|
66 #define PRINTLOG1(a,b) RDebug::Print(_L(a),b) |
|
67 |
|
68 #include "locationmanagerdebug.inl" // inline fuctions implementations |
|
69 |
|
70 #else |
|
71 |
|
72 // DEBUG build is not on --> no logging at all |
|
73 #define LOG(a) |
|
74 #define LOG1(a,b) |
|
75 #define TRACE(a) |
|
76 |
|
77 #endif // _DEBUG |
|
78 |
|
79 #endif // LOCATIONMANAGERDEBUG_H |
|
80 |
|
81 // End of File |