|
1 /* |
|
2 * Copyright (c) 2010 Kanrikogaku Kenkyusho, Ltd. |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of the License "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 * Kanrikogaku Kenkyusho, Ltd. - Initial contribution |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // Protection against nested includes |
|
20 #ifndef __CLOG_H__ |
|
21 #define __CLOG_H__ |
|
22 |
|
23 // System includes |
|
24 #include <e32base.h> |
|
25 #include <e32std.h> |
|
26 |
|
27 #include "logdef.h" |
|
28 |
|
29 #ifdef ENABLE_LOGGING |
|
30 #define LOG(s) Log::DoLog(_L(s)) |
|
31 #define LOG1(s, v) Log::DoLog( _L(s), v ) |
|
32 #define LOG2(s, v1, v2) Log::DoLog( _L(s), v1, v2 ) |
|
33 #define LOG3(s, v1, v2, v3) Log::DoLog( _L(s), v1, v2, v3 ) |
|
34 |
|
35 #define LOG8(s) Log::DoLog8(_L8(s)) |
|
36 #define LOG81(s, v) Log::DoLog8( _L8(s), v ) |
|
37 #define LOG82(s, v1, v2) Log::DoLog8( _L8(s), v1, v2 ) |
|
38 #define LOG83(s, v1, v2, v3) Log::DoLog8( _L8(s), v1, v2, v3 ) |
|
39 |
|
40 #else |
|
41 #define LOG(s) |
|
42 #define LOG1(s, v) |
|
43 #define LOG2(s, v1, v2) |
|
44 #define LOG3(s, v1, v2, v3) |
|
45 |
|
46 #define LOG8(s) |
|
47 #define LOG81(s, v) |
|
48 #define LOG82(s, v1, v2) |
|
49 #define LOG83(s, v1, v2, v3) |
|
50 #endif // ENABLE_LOGGING |
|
51 |
|
52 class Log |
|
53 { |
|
54 |
|
55 public: |
|
56 |
|
57 static void DoLog( TRefByValue<const TDesC> aText, ... ); |
|
58 |
|
59 static void DoLog8( TRefByValue<const TDesC8> aText, ... ); |
|
60 }; |
|
61 |
|
62 #endif // __CLOG_H__ |
|
63 |
|
64 // End of File |