1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). |
1 // Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). |
2 // All rights reserved. |
2 // All rights reserved. |
3 // This component and the accompanying materials are made available |
3 // This component and the accompanying materials are made available |
4 // under the terms of "Eclipse Public License v1.0" |
4 // under the terms of "Eclipse Public License v1.0" |
5 // which accompanies this distribution, and is available |
5 // which accompanies this distribution, and is available |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
25 #ifndef __LTSYLOGGER_H_ |
25 #ifndef __LTSYLOGGER_H_ |
26 #define __LTSYLOGGER_H_ |
26 #define __LTSYLOGGER_H_ |
27 |
27 |
28 #include <e32base.h> |
28 #include <e32base.h> |
29 |
29 |
30 #ifdef _DEBUG |
30 #ifdef OST_TRACE_COMPILER_IN_USE |
31 |
31 |
32 #include <comms-infras/commsdebugutility.h> |
|
33 _LIT8(KTsySubSystem, "tsy"); |
32 _LIT8(KTsySubSystem, "tsy"); |
34 _LIT8(KTsyCompnt, "ctsydis"); |
33 _LIT8(KTsyCompnt, "ctsydis"); |
35 |
34 |
36 /** Regular logging macro */ |
|
37 #define LOG(format, ARGS...) \ |
|
38 { \ |
|
39 RFileLogger::WriteFormat(KTsySubSystem, KTsyCompnt, format, ##ARGS); \ |
|
40 } |
|
41 |
|
42 /** Macros to log function entry and exit */ |
35 /** Macros to log function entry and exit */ |
43 //#define TSYLOGENTRYEXIT(aFunc) TLogEntryExit __logger((aFunc), KTsyCompnt) |
36 //#define TSYLOGENTRYEXIT(aFunc) TLogEntryExit __logger((aFunc), KTsyCompnt) |
44 |
37 |
45 //#define TSYLOGENTRYEXITARGS(aFunc, aFmt, ARGS...) TLogEntryExit __logger((aFunc), KTsyCompnt, (aFmt), ##ARGS); |
38 //#define TSYLOGENTRYEXITARGS(aFunc, aFmt, ARGS...) TLogEntryExit __logger((aFunc), KTsyCompnt, (aFmt), ##ARGS); |
46 |
39 |
82 |
75 |
83 |
76 |
84 |
77 |
85 #else // _DEBUG |
78 #else // _DEBUG |
86 |
79 |
87 #define LOG(format, ARGS...) |
|
88 #define TSYLOGENTRYEXIT |
80 #define TSYLOGENTRYEXIT |
89 #define TSYLOGENTRYEXITARGS(aFunc, aFmt, ARGS...) |
81 #define TSYLOGENTRYEXITARGS(aFunc, aFmt, ARGS...) |
90 #define TSYLOGSETEXITERR(aErr) aErr // So that we don't lose the return code in UREL! |
82 #define TSYLOGSETEXITERR(aErr) aErr // So that we don't lose the return code in UREL! |
91 |
83 |
92 |
84 |