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