|
1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "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 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: wipe plugins debug file for LAWMO component |
|
15 * |
|
16 */ |
|
17 |
|
18 //#define _DEBUG |
|
19 |
|
20 #ifndef _LAWMO_DEBUG_H_ |
|
21 #define _LAWMO_DEBUG_H_ |
|
22 |
|
23 #include <e32std.h> |
|
24 #include <f32file.h> |
|
25 #include <flogger.h> |
|
26 #include <e32svr.h> |
|
27 |
|
28 _LIT( KLogFile, "pluginslogs.log" ); |
|
29 _LIT( KLogDirFullName, "c:\\logs\\" ); |
|
30 _LIT( KLogDir, "lawmo" ); |
|
31 |
|
32 #ifdef _DEBUG |
|
33 inline void FWrite (TRefByValue<const TDesC> aFmt,...) |
|
34 { |
|
35 VA_LIST list; |
|
36 VA_START( list, aFmt ); |
|
37 RFileLogger::WriteFormat( KLogDir,KLogFile,EFileLoggingModeAppend ,TPtrC(aFmt) ,list ); |
|
38 } |
|
39 |
|
40 #ifndef __GNUC__ |
|
41 #define FLOG FWrite |
|
42 #define FLOG8(x,y) RFileLogger::WriteFormat( KLogDir,KLogFile,EFileLoggingModeAppend ,_L8(x) ,y ); |
|
43 #else // __GNUC__ |
|
44 #define FLOG(arg...) FWrite(arg); |
|
45 #define FLOG8(arg...) RFileLogger::WriteFormat( KLogDir,KLogFile,EFileLoggingModeAppend ,_L8(aFmt) ,list ); |
|
46 #endif // __GNUC__ |
|
47 |
|
48 #else |
|
49 #define FLOG |
|
50 #define FLOG8(x,y) |
|
51 #endif /* __LAWMO_PLUGINS_ */ |
|
52 #endif /*_LAWMO_DEBUG_H_*/ |