|
1 // Copyright (c) 2005-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 // |
|
15 |
|
16 #ifndef ECOM_DEBUG_H |
|
17 #define ECOM_DEBUG_H |
|
18 |
|
19 #include <e32debug.h> |
|
20 #include <ecom/ecompanics.h> |
|
21 |
|
22 // Make sure release builds get a warning if |
|
23 #ifndef _DEBUG |
|
24 #if (defined ECOM_TRACE) |
|
25 #warning "Use of RDebug::Print tracing in a release build, check MMP files" |
|
26 #endif |
|
27 #endif |
|
28 |
|
29 // Panic category string for client DLL panics, see ecompanic.h |
|
30 _LIT(KEComClientDLLPanicCategory, "ECOMClientDLL"); |
|
31 |
|
32 // Panic category string for server panics, see ecompanic.h |
|
33 _LIT(KEComServerPanicCategory, "ECOMServer"); |
|
34 |
|
35 // |
|
36 // MACROs for log statements in client/server code. |
|
37 // |
|
38 |
|
39 #define __ECOM_LOG(_text) RDebug::Print(_L(_text)) |
|
40 #define __ECOM_LOG1(_text, _a1) RDebug::Print(_L(_text), (_a1)) |
|
41 |
|
42 // |
|
43 // MACROs for trace statements in client/server code. |
|
44 // |
|
45 |
|
46 #ifdef ECOM_TRACE |
|
47 |
|
48 #define __ECOM_TRACE(_text) RDebug::Print(_L(_text)) |
|
49 #define __ECOM_TRACE1(_text, _a1) RDebug::Print(_L(_text), (_a1)) |
|
50 #define __ECOM_TRACE2(_text, _a1, _a2) RDebug::Print(_L(_text), (_a1), (_a2)) |
|
51 #define __ECOM_TRACE3(_text, _a1, _a2, _a3) RDebug::Print(_L(_text), (_a1), (_a2), (_a3)) |
|
52 #define __ECOM_TRACE4(_text, _a1, _a2, _a3, _a4) RDebug::Print(_L(_text), (_a1), (_a2), (_a3), (_a4)) |
|
53 #define __ECOM_TRACE5(_text, _a1, _a2, _a3, _a4, _a5) RDebug::Print(_L(_text), (_a1), (_a2), (_a3), (_a4), (_a5)) |
|
54 #define __ECOM_TRACE6(_text, _a1, _a2, _a3, _a4, _a5, _a6) RDebug::Print(_L(_text), (_a1), (_a2), (_a3), (_a4), (_a5), (_a6)) |
|
55 |
|
56 #else |
|
57 |
|
58 #define __ECOM_TRACE(_text) |
|
59 #define __ECOM_TRACE1(_text, _a1) |
|
60 #define __ECOM_TRACE2(_text, _a1, _a2) |
|
61 #define __ECOM_TRACE3(_text, _a1, _a2, _a3) |
|
62 #define __ECOM_TRACE4(_text, _a1, _a2, _a3, _a4) |
|
63 #define __ECOM_TRACE5(_text, _a1, _a2, _a3, _a4, _a5) |
|
64 #define __ECOM_TRACE6(_text, _a1, _a2, _a3, _a4, _a5, _a6) |
|
65 |
|
66 #endif |
|
67 |
|
68 |
|
69 |
|
70 |
|
71 #endif // ECOM_DEBUG_H |
|
72 |