|
1 // tcpcsylog.h |
|
2 // |
|
3 // Copyright (c) 2008 - 2010 Accenture. All rights reserved. |
|
4 // This component and the accompanying materials are made available |
|
5 // under the terms of the "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 // Accenture - Initial contribution |
|
11 // |
|
12 |
|
13 #ifndef __TCPCSYLOG_H__ |
|
14 #define __TCPCSYLOG_H__ |
|
15 |
|
16 #include <e32std.h> |
|
17 #include <comms-infras/commsdebugutility.h> |
|
18 |
|
19 // The following 4 macros define the level of logging in udeb. |
|
20 // The macros are (un)defined in the tcpcsy.mmp file. |
|
21 |
|
22 #ifdef __FLOG_ACTIVE |
|
23 |
|
24 _LIT8(KDebugSubSystem, "fshell"); |
|
25 |
|
26 #ifdef LOG_CSY_EVENTS |
|
27 _LIT8(KDebugCategoryEvents, "tcpcsy_event"); |
|
28 _LIT8(KDebugCategoryEventsStatic, "tcpcsy_static"); |
|
29 #define LOG(A,ARGS...) {_LIT8(KA,A);this->iFactory.iEventLogger.WriteFormat(KA(),##ARGS);} |
|
30 #define LOG_STATIC(A,ARGS...) {_LIT8(KA,A);__FLOG_STATIC_VA((KDebugSubSystem(),KDebugCategoryEventsStatic(),KA(),##ARGS));} |
|
31 #else |
|
32 #define LOG(A,ARGS...) |
|
33 #define LOG_STATIC(A,ARGS...) |
|
34 #endif // LOG_CSY_EVENTS |
|
35 |
|
36 #ifdef LOG_CSY_TX |
|
37 _LIT8(KDebugCategoryTx, "tcpcsy_tx"); |
|
38 #define LOGTx(A,ARGS...) {_LIT8(KA,A);this->iFactory.iTxLogger.WriteFormat(KA(),##ARGS);} |
|
39 #else |
|
40 #define LOGTx(A,ARGS...) |
|
41 #endif // LOG_CSY_TX |
|
42 |
|
43 #ifdef LOG_CSY_RX |
|
44 _LIT8(KDebugCategoryRx, "tcpcsy_rx"); |
|
45 #define LOGRx(A,ARGS...) {_LIT8(KA,A);this->iFactory.iRxLogger.WriteFormat(KA(),##ARGS);} |
|
46 #else |
|
47 #define LOGRx(A,ARGS...) |
|
48 #endif // LOG_CSY_RX |
|
49 |
|
50 #else |
|
51 |
|
52 #define LOG(A,ARGS...) |
|
53 #define LOGTx(A,ARGS...) |
|
54 #define LOGRx(A,ARGS...) |
|
55 #define LOG_STATIC(A,ARGS...) |
|
56 |
|
57 #endif // __FLOG_ACTIVE |
|
58 |
|
59 |
|
60 #endif // __TCPCSYLOG_H__ |