|
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: Implementation of DM Device Dialogs |
|
15 */ |
|
16 |
|
17 #ifndef __DMDEVDEBUG_H_ |
|
18 #define __DMDEVDEBUG_H_ |
|
19 #include <e32debug.h> |
|
20 #if 0 |
|
21 #ifdef _DEBUG |
|
22 #define _DMDEV_DEBUG |
|
23 #endif |
|
24 |
|
25 #ifdef _DMDEV_DEBUG |
|
26 |
|
27 #include <e32std.h> |
|
28 #include <f32file.h> |
|
29 #include <flogger.h> |
|
30 #include <e32svr.h> |
|
31 |
|
32 _LIT( KLogFile, "dmdevdialog.log" ); |
|
33 _LIT( KLogDirFullName, "c:\\logs\\" ); |
|
34 _LIT( KLogDir, "Dmdd" ); |
|
35 |
|
36 inline void FWrite (TRefByValue<const TDesC> aFmt,...) |
|
37 { |
|
38 VA_LIST list; |
|
39 VA_START( list, aFmt ); |
|
40 RFileLogger::WriteFormat( KLogDir,KLogFile,EFileLoggingModeAppend ,TPtrC(aFmt) ,list ); |
|
41 } |
|
42 |
|
43 |
|
44 #ifdef _DMDEV_DEBUG_RDEBUG |
|
45 #ifndef __GNUC__ |
|
46 #define FLOG RDebug::Print |
|
47 #else // __GNUC__ |
|
48 #define FLOG(arg...) RDebug::Print(arg); |
|
49 #endif // __GNUC__ |
|
50 #else // _DMDEV_DEBUG_RDEBUG |
|
51 #ifndef __GNUC__ |
|
52 #define FLOG FWrite |
|
53 #else // __GNUC__ |
|
54 #define FLOG(arg...) FWrite(arg); |
|
55 #endif // __GNUC__ |
|
56 #endif // _DMDEV_DEBUG_RDEBUG |
|
57 |
|
58 #else // _DMDEV_DEBUG |
|
59 #ifndef __GNUC__ |
|
60 #define FLOG |
|
61 #else |
|
62 #define FLOG(arg...) |
|
63 #endif // __GNUC__ |
|
64 #endif // _DMDEV_DEBUG |
|
65 #endif |
|
66 #define FLOG(arg...) RDebug::Print(arg); |
|
67 #endif /*DMDEVDEBUG_H_*/ |