fotaapplication/FotaScheduleHandler/inc/FotaSchedDebug.h
author hgs
Tue, 13 Jul 2010 09:51:41 +0530
changeset 51 2e64dc50f295
permissions -rw-r--r--
201025_02
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
51
2e64dc50f295 201025_02
hgs
parents:
diff changeset
     1
/*
2e64dc50f295 201025_02
hgs
parents:
diff changeset
     2
* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). 
2e64dc50f295 201025_02
hgs
parents:
diff changeset
     3
* All rights reserved.
2e64dc50f295 201025_02
hgs
parents:
diff changeset
     4
* This component and the accompanying materials are made available
2e64dc50f295 201025_02
hgs
parents:
diff changeset
     5
* under the terms of "Eclipse Public License v1.0"
2e64dc50f295 201025_02
hgs
parents:
diff changeset
     6
* which accompanies this distribution, and is available
2e64dc50f295 201025_02
hgs
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
2e64dc50f295 201025_02
hgs
parents:
diff changeset
     8
*
2e64dc50f295 201025_02
hgs
parents:
diff changeset
     9
* Initial Contributors:
2e64dc50f295 201025_02
hgs
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
2e64dc50f295 201025_02
hgs
parents:
diff changeset
    11
*
2e64dc50f295 201025_02
hgs
parents:
diff changeset
    12
* Contributors:
2e64dc50f295 201025_02
hgs
parents:
diff changeset
    13
*
2e64dc50f295 201025_02
hgs
parents:
diff changeset
    14
* Description:   This file defines logging macros 
2e64dc50f295 201025_02
hgs
parents:
diff changeset
    15
*
2e64dc50f295 201025_02
hgs
parents:
diff changeset
    16
*/
2e64dc50f295 201025_02
hgs
parents:
diff changeset
    17
2e64dc50f295 201025_02
hgs
parents:
diff changeset
    18
2e64dc50f295 201025_02
hgs
parents:
diff changeset
    19
2e64dc50f295 201025_02
hgs
parents:
diff changeset
    20
#ifndef FOTADEBUG_H
2e64dc50f295 201025_02
hgs
parents:
diff changeset
    21
#define FOTADEBUG_H
2e64dc50f295 201025_02
hgs
parents:
diff changeset
    22
2e64dc50f295 201025_02
hgs
parents:
diff changeset
    23
    #ifdef _FOTA_DEBUG
2e64dc50f295 201025_02
hgs
parents:
diff changeset
    24
2e64dc50f295 201025_02
hgs
parents:
diff changeset
    25
2e64dc50f295 201025_02
hgs
parents:
diff changeset
    26
        #include <e32std.h>
2e64dc50f295 201025_02
hgs
parents:
diff changeset
    27
        #include <f32file.h>
2e64dc50f295 201025_02
hgs
parents:
diff changeset
    28
        #include <flogger.h>
2e64dc50f295 201025_02
hgs
parents:
diff changeset
    29
        #include <e32svr.h>
2e64dc50f295 201025_02
hgs
parents:
diff changeset
    30
2e64dc50f295 201025_02
hgs
parents:
diff changeset
    31
        _LIT( KLogFile, "fotaschedhandler.log" );
2e64dc50f295 201025_02
hgs
parents:
diff changeset
    32
        _LIT( KLogDir, "fota" );
2e64dc50f295 201025_02
hgs
parents:
diff changeset
    33
2e64dc50f295 201025_02
hgs
parents:
diff changeset
    34
        inline void FWrite (TRefByValue<const TDesC> aFmt,...)
2e64dc50f295 201025_02
hgs
parents:
diff changeset
    35
            {
2e64dc50f295 201025_02
hgs
parents:
diff changeset
    36
            VA_LIST list;
2e64dc50f295 201025_02
hgs
parents:
diff changeset
    37
            VA_START( list, aFmt );
2e64dc50f295 201025_02
hgs
parents:
diff changeset
    38
            RFileLogger::WriteFormat( KLogDir,KLogFile,EFileLoggingModeAppend ,TPtrC(aFmt) ,list );
2e64dc50f295 201025_02
hgs
parents:
diff changeset
    39
            }
2e64dc50f295 201025_02
hgs
parents:
diff changeset
    40
2e64dc50f295 201025_02
hgs
parents:
diff changeset
    41
2e64dc50f295 201025_02
hgs
parents:
diff changeset
    42
        #ifdef _FOTA_DEBUG_RDEBUG 
2e64dc50f295 201025_02
hgs
parents:
diff changeset
    43
            #ifndef __GNUC__          
2e64dc50f295 201025_02
hgs
parents:
diff changeset
    44
                #define FLOG            RDebug::Print
2e64dc50f295 201025_02
hgs
parents:
diff changeset
    45
            #else   // __GNUC__       
2e64dc50f295 201025_02
hgs
parents:
diff changeset
    46
                #define FLOG(arg...)    RDebug::Print(arg);
2e64dc50f295 201025_02
hgs
parents:
diff changeset
    47
            #endif // __GNUC__        
2e64dc50f295 201025_02
hgs
parents:
diff changeset
    48
        #else // _FOTA_DEBUG_RDEBUG
2e64dc50f295 201025_02
hgs
parents:
diff changeset
    49
            #ifndef __GNUC__          
2e64dc50f295 201025_02
hgs
parents:
diff changeset
    50
                #define FLOG            FWrite
2e64dc50f295 201025_02
hgs
parents:
diff changeset
    51
            #else   // __GNUC__       
2e64dc50f295 201025_02
hgs
parents:
diff changeset
    52
                #define FLOG(arg...)    FWrite(arg);
2e64dc50f295 201025_02
hgs
parents:
diff changeset
    53
            #endif // __GNUC__        
2e64dc50f295 201025_02
hgs
parents:
diff changeset
    54
        #endif // _FOTA_DEBUG_RDEBUG
2e64dc50f295 201025_02
hgs
parents:
diff changeset
    55
2e64dc50f295 201025_02
hgs
parents:
diff changeset
    56
    #else   // _FOTA_DEBUG    
2e64dc50f295 201025_02
hgs
parents:
diff changeset
    57
        #ifndef __GNUC__
2e64dc50f295 201025_02
hgs
parents:
diff changeset
    58
            #define FLOG
2e64dc50f295 201025_02
hgs
parents:
diff changeset
    59
        #else
2e64dc50f295 201025_02
hgs
parents:
diff changeset
    60
            #define FLOG(arg...)
2e64dc50f295 201025_02
hgs
parents:
diff changeset
    61
        #endif // __GNUC__
2e64dc50f295 201025_02
hgs
parents:
diff changeset
    62
    #endif // _FOTA_DEBUG
2e64dc50f295 201025_02
hgs
parents:
diff changeset
    63
2e64dc50f295 201025_02
hgs
parents:
diff changeset
    64
#endif      // FOTADEBUG_H
2e64dc50f295 201025_02
hgs
parents:
diff changeset
    65
            
2e64dc50f295 201025_02
hgs
parents:
diff changeset
    66
// End of File