|
1 /* |
|
2 * Copyright (c) 2008-2008 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: Logger definitions |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CCHUILOGGER_H |
|
20 #define CCHUILOGGER_H |
|
21 |
|
22 #include <e32def.h> |
|
23 #include <e32svr.h> |
|
24 |
|
25 //---------------------------------------------------------------------------- |
|
26 // USER LOGGING SETTINGS |
|
27 //---------------------------------------------------------------------------- |
|
28 |
|
29 #ifndef _DEBUG |
|
30 |
|
31 /*************************** |
|
32 * Logging method variants: |
|
33 * 0 = No logging |
|
34 * 1 = RDebug |
|
35 ***************************/ |
|
36 |
|
37 #define CCHUI_DEBUG 0 // UREL BUILD |
|
38 |
|
39 #else |
|
40 |
|
41 #define CCHUI_DEBUG 1 // UDEB BUILD |
|
42 |
|
43 #endif // _DEBUG |
|
44 |
|
45 |
|
46 |
|
47 //---------------------------------------------------------------------------- |
|
48 // LOGGING MACROs (DO NOT EDIT) |
|
49 // |
|
50 // USE THESE MACROS IN YOUR CODE |
|
51 //---------------------------------------------------------------------------- |
|
52 |
|
53 #if CCHUI_DEBUG == 1 // RDebug |
|
54 |
|
55 #define CCHUI_TP_PRINT(s) L##s |
|
56 #define CCHUI_STRA_PRINT(s) CCHUI_TP_PRINT(s) |
|
57 #define CCHUI_STR_PRINT(t) CCHUI_STRA_PRINT("[CCHUI]") L##t |
|
58 #define CCHUI_LIT_PRINT(s) TPtrC((const TText *) CCHUI_STR_PRINT(s)) |
|
59 |
|
60 #define CCHUIDEBUG(AA) { RDebug::Print(CCHUI_LIT_PRINT(AA)); } |
|
61 #define CCHUIDEBUG2(AA,BB) { RDebug::Print(CCHUI_LIT_PRINT(AA),BB); } |
|
62 #define CCHUIDEBUG3(AA,BB,CC) { RDebug::Print(CCHUI_LIT_PRINT(AA),BB,CC); } |
|
63 #define CCHUIDEBUG4(AA,BB,CC,DD) { RDebug::Print(CCHUI_LIT_PRINT(AA),BB,CC,DD); } |
|
64 |
|
65 #else // CCHUI_DEBUG == 0 or invalid -> Disable loggings |
|
66 |
|
67 #define CCHUIDEBUG(AA) |
|
68 #define CCHUIDEBUG2(AA,BB) |
|
69 #define CCHUIDEBUG3(AA,BB,CC) |
|
70 #define CCHUIDEBUG4(AA,BB,CC,DD) |
|
71 |
|
72 #endif // CCHUI_DEBUG |
|
73 |
|
74 #endif // CCHUILOGGER_H |
|
75 |