|
1 // Copyright (c) 1997-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 // Declares MBuf logging |
|
15 // |
|
16 // |
|
17 |
|
18 #ifndef MBUF_LOG |
|
19 #define MBUF_LOG |
|
20 |
|
21 #include "comms-infras/commsdebugutility.h" // for __FLOG* |
|
22 #include "cflog.h" |
|
23 __FLOG_STMT(_LIT8(KSubsysMBufMgr, "MBufMgr");) // subsystem name |
|
24 __FLOG_STMT(_LIT8(KComponentPerformance, "performance");) // component name - used for any sub-optimal performance behaviuor |
|
25 |
|
26 // CDU and flogger have multiple conflicts (eg. KLogBufferSize), consequently theirs headers can not both be included at the same time |
|
27 // - eg. tcpip6 uses flogger & mbufs |
|
28 // - solutions/workarounds; |
|
29 // 1. __FLOG_STATIC* macros --> open & close the CDU for every logging statement |
|
30 // +ve - does not use __FLOG_DECLARATION_MEMBER in the class decleration (ie. typically public) |
|
31 // -ve - very slow |
|
32 // 2. __CFLOG* macros --> uses __FLOG_DECLARATION_MEMBER stored within commsfw (requires a TLS lookup for every logging statement) |
|
33 // +ve - does not use __FLOG_DECLARATION_MEMBER in the class decleration (ie. typically public) |
|
34 // -ve - slow, but not as slow as static |
|
35 // 3. __CFLOG* macros --> uses __FLOG_DECLARATION_MEMBER stored within class |
|
36 // +ve - fast, no TLS or open/close of CDU |
|
37 // -ve - clashes arise when users of the class include the header file if they use flogger instead of CDU |
|
38 // 4. As per 3, except that __FLOG_DECLARATION_MEMBER is not used; TInt iFlogger added to classes & __logger__ defined (refer below) |
|
39 // +ve - no clashes for users that use flogger |
|
40 // -ve - requires a redecleration of __logger__ --> ideally this could/should be made available by a CDU header file (but alas is not) |
|
41 #define __logger__ (reinterpret_cast<RFileLogger&>(iLogger)) |
|
42 |
|
43 #endif // MBUF_LOG |