|
1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // Logging macros for use in debug subsystem |
|
15 // |
|
16 |
|
17 |
|
18 |
|
19 /** |
|
20 @file |
|
21 @internalTechnology |
|
22 @released |
|
23 */ |
|
24 |
|
25 #ifndef DEBUG_LOGGING_H |
|
26 #define DEBUG_LOGGING_H |
|
27 |
|
28 /* |
|
29 * Debug messages are only generated for debug builds. |
|
30 */ |
|
31 |
|
32 #ifdef FLASHDUMPDEBUG |
|
33 |
|
34 #include <e32debug.h> |
|
35 #define LOG_DES(des) {if(des.Length() > 0) {RBuf buf; buf.CreateL(des); char *ptr = (char*)buf.Collapse().PtrZ(); LOG_MSG2("\n(%s)\n", ptr); buf.Close();} } |
|
36 |
|
37 #define LOG_MSG( a ) RDebug::Printf( a ) |
|
38 #define LOG_MSG2( a, b ) RDebug::Printf( a, b ) |
|
39 #define LOG_MSG3( a, b, c ) RDebug::Printf( a, b, c ) |
|
40 #define LOG_MSG4( a, b, c, d ) RDebug::Printf( a, b, c, d ) |
|
41 #define LOG_MSG5( a, b, c, d, e ) RDebug::Printf( a, b, c, d, e ) |
|
42 |
|
43 #else |
|
44 |
|
45 #define LOG_DES(des) |
|
46 #define LOG_MSG( a ) |
|
47 #define LOG_MSG2( a, b ) |
|
48 #define LOG_MSG3( a, b, c ) |
|
49 #define LOG_MSG4( a, b, c, d ) |
|
50 #define LOG_MSG5( a, b, c, d, e ) |
|
51 |
|
52 #endif |
|
53 |
|
54 #endif //DEBUG_LOGGING_H |