1 // Copyright (c) 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 // TSYLogger |
|
15 |
|
16 #include <e32std.h> // for basic Symbian data types |
|
17 |
|
18 #ifndef __MSLOGGER_H__ |
|
19 #define __MSLOGGER_H__ |
|
20 |
|
21 #ifdef _DEBUG |
|
22 #define __LOGDEB__ |
|
23 #else |
|
24 #define __LOGREL__ |
|
25 #endif |
|
26 |
|
27 #ifdef __LOGDEB__ |
|
28 #define __LOGREL__ |
|
29 #endif |
|
30 |
|
31 #ifdef __LOGDEB__ |
|
32 #define LOGTEXT(AAA) TSYLogger::Write(AAA) |
|
33 #else |
|
34 #define LOGTEXT(AAA) |
|
35 #endif |
|
36 |
|
37 #ifdef __LOGDEB__ |
|
38 #define LOGTEXT2(AAA,BBB) TSYLogger::WriteFormat(AAA,BBB) |
|
39 #else |
|
40 #define LOGTEXT2(AAA,BBB) |
|
41 #endif |
|
42 |
|
43 #ifdef __LOGDEB__ |
|
44 #define LOGTEXT3(AAA,BBB,CCC) TSYLogger::WriteFormat(AAA,BBB,CCC) |
|
45 #else |
|
46 #define LOGTEXT3(AAA,BBB,CCC) |
|
47 #endif |
|
48 |
|
49 #ifdef __LOGREL__ |
|
50 #define LOGTEXTREL(AAA) TSYLogger::Write(AAA) |
|
51 #else |
|
52 #define LOGTEXTREL(AAA) |
|
53 #endif |
|
54 |
|
55 #ifdef __LOGREL__ |
|
56 #define LOGTEXTREL2(AAA,BBB) TSYLogger::WriteFormat(AAA,BBB) |
|
57 #else |
|
58 #define LOGTEXTREL2(AAA,BBB) |
|
59 #endif |
|
60 |
|
61 #ifdef __LOGREL__ |
|
62 #define LOGTEXTREL3(AAA,BBB,CCC) TSYLogger::WriteFormat(AAA,BBB,CCC) |
|
63 #else |
|
64 #define LOGTEXTREL3(AAA,BBB,CCC) |
|
65 #endif |
|
66 |
|
67 // TSYLogger |
|
68 // Implements logging. All static calls. |
|
69 |
|
70 class TSYLogger |
|
71 { |
|
72 public: |
|
73 static void Write(const TDesC8& aText); |
|
74 static void WriteFormat(TRefByValue<const TDesC8> aFmt,...); |
|
75 }; |
|
76 |
|
77 #endif // __MSLOGGER_H__ |
|