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