|
1 /* |
|
2 * Copyright (c) 2005-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: |
|
15 * Name : SipLogs.h |
|
16 * Part of : Logging |
|
17 * Version : SIP/4.0 |
|
18 * |
|
19 */ |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 /** |
|
25 @internalComponent |
|
26 */ |
|
27 |
|
28 |
|
29 #ifndef SIPLOGS_H |
|
30 #define SIPLOGS_H |
|
31 |
|
32 #include <e32std.h> |
|
33 |
|
34 #ifdef _DEBUG |
|
35 // Comment the following line to turn off all kind of logging: |
|
36 #define USE_SIP_LOGS |
|
37 |
|
38 // Comment the following line to switch from RFileLogger to RDebug logging: |
|
39 #define USE_SIP_FILE_LOGS |
|
40 |
|
41 // Comment the following line to switch off SIP message logging |
|
42 #define USE_SIP_MESSAGE_LOG |
|
43 #endif |
|
44 |
|
45 |
|
46 #ifdef USE_SIP_LOGS |
|
47 |
|
48 #include "TSIPLogger.h" |
|
49 |
|
50 #define __SIP_LOG(aStr)\ |
|
51 TSIPLogger::Print(_L(aStr)); |
|
52 |
|
53 #define __SIP_DES8_LOG(aStr,aMsg)\ |
|
54 TSIPLogger::Print(_L(aStr), aMsg); |
|
55 |
|
56 #define __SIP_DES16_LOG(aStr,aMsg)\ |
|
57 TSIPLogger::Print(_L(aStr), aMsg); |
|
58 |
|
59 #define __SIP_INT_LOG1(aStr,aValue)\ |
|
60 TSIPLogger::Print(_L(aStr), aValue); |
|
61 |
|
62 #define __SIP_INT_LOG2(aStr,aValue1,aValue2)\ |
|
63 TSIPLogger::Print(_L(aStr), aValue1, aValue2); |
|
64 |
|
65 #define __SIP_ADDR_LOG(aStr,aAddr)\ |
|
66 TSIPLogger::Print(_L(aStr), aAddr); |
|
67 |
|
68 #ifdef USE_SIP_MESSAGE_LOG |
|
69 #include "TSIPMessageLogger.h" |
|
70 #define __SIP_MESSAGE_LOG(aSubsystemName, aMessage)\ |
|
71 TSIPMessageLogger::Write(_L8(aSubsystemName),aMessage); |
|
72 #else |
|
73 #define __SIP_MESSAGE_LOG(aSubsystemName,aSIPMessage) |
|
74 #endif // USE_SIP_MESSAGE_LOG |
|
75 |
|
76 #else // _USE_SIP_LOGS |
|
77 |
|
78 #define __SIP_LOG(aStr) |
|
79 #define __SIP_DES8_LOG(aStr,aMsg) |
|
80 #define __SIP_DES16_LOG(aStr,aMsg) |
|
81 #define __SIP_INT_LOG1(aStr,aValue) |
|
82 #define __SIP_INT_LOG2(aStr,aValue1,aValue2) |
|
83 #define __SIP_ADDR_LOG(aStr,aAddr) |
|
84 #define __SIP_MESSAGE_LOG(aSubsystemName,aSIPMessage) |
|
85 |
|
86 #endif // USE_SIP_LOGS |
|
87 |
|
88 |
|
89 #endif // SIPLOGS_H |
|
90 |
|
91 // End of File |