|
1 /* |
|
2 * Copyright (c) 2007-2007 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 IPVMBXLOGGER_H |
|
20 #define IPVMBXLOGGER_H |
|
21 |
|
22 |
|
23 #ifdef _DEBUG |
|
24 |
|
25 #include <e32debug.h> |
|
26 #define DPRINT_ON |
|
27 |
|
28 #endif // _DEBUG |
|
29 |
|
30 |
|
31 #ifdef DPRINT_ON // RDebug |
|
32 |
|
33 #define IPVME( A ) L##A |
|
34 #define IPVMESTUPID( A ) IPVME( A ) |
|
35 #define IPVMESTR( A ) IPVMESTUPID( "[IPVME]" ) L##A |
|
36 #define IPVMESTRCAST( A ) TPtrC((const TText *) IPVMESTR( A )) |
|
37 |
|
38 #define IPVMEPRINT( D ) { RDebug::Print( IPVMESTRCAST( D ) ); } |
|
39 #define IPVMEPRINT2( A, B ) { RDebug::Print( IPVMESTRCAST( A ), B ); } |
|
40 #define IPVMEPRINT3( A, B, C ) { RDebug::Print( IPVMESTRCAST( A ), B, C ); } |
|
41 #define IPVMEPRINT4( A, B, C, D ) { RDebug::Print( IPVMESTRCAST( A ), B, C, D ); } |
|
42 |
|
43 #else // No debug prints |
|
44 |
|
45 #define IPVMEPRINT( A ) |
|
46 #define IPVMEPRINT2( A, B ) |
|
47 #define IPVMEPRINT3( A, B, C ) |
|
48 #define IPVMEPRINT4( A, B, C, D ) |
|
49 |
|
50 #endif |
|
51 |
|
52 |
|
53 #endif // IPVMBXLOGGER_H |