equal
deleted
inserted
replaced
1 /* |
|
2 * Copyright (c) 2005-2006 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: This file defines logging macros |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef FOTADEBUG_H |
|
21 #define FOTADEBUG_H |
|
22 |
|
23 // IMPORT_C static TInt Print(TRefByValue<const TDesC> aFmt,...); |
|
24 #ifdef _FOTA_DEBUG |
|
25 |
|
26 #include <e32std.h> |
|
27 #include <f32file.h> |
|
28 #include <flogger.h> |
|
29 #include <e32svr.h> |
|
30 |
|
31 _LIT( KLogFile, "fotaengine.log" ); |
|
32 _LIT( KLogDirFullName, "c:\\logs\\" ); |
|
33 _LIT( KLogDir, "fota" ); |
|
34 |
|
35 inline void FWrite (TRefByValue<const TDesC> aFmt,...) |
|
36 { |
|
37 VA_LIST list; |
|
38 VA_START( list, aFmt ); |
|
39 RFileLogger::WriteFormat( KLogDir,KLogFile,EFileLoggingModeAppend ,TPtrC(aFmt) ,list ); |
|
40 } |
|
41 |
|
42 |
|
43 #ifdef _FOTA_DEBUG_RDEBUG |
|
44 #ifndef __GNUC__ |
|
45 #define FLOG RDebug::Print |
|
46 #else // __GNUC__ |
|
47 #define FLOG(arg...) RDebug::Print(arg); |
|
48 #endif // __GNUC__ |
|
49 #else // _FOTA_DEBUG_RDEBUG |
|
50 #ifndef __GNUC__ |
|
51 #define FLOG FWrite |
|
52 #else // __GNUC__ |
|
53 #define FLOG(arg...) FWrite(arg); |
|
54 #endif // __GNUC__ |
|
55 #endif // _FOTA_DEBUG_RDEBUG |
|
56 |
|
57 #else // _FOTA_DEBUG |
|
58 #ifndef __GNUC__ |
|
59 #define FLOG |
|
60 #else |
|
61 #define FLOG(arg...) |
|
62 #endif // __GNUC__ |
|
63 #endif // _FOTA_DEBUG |
|
64 |
|
65 #endif // FOTADEBUG_H |
|
66 |
|
67 // End of File |
|