fotaapplication/fmserver/inc/fmsdebug.h
branchRCL_3
changeset 26 19bba8228ff0
parent 25 b183ec05bd8c
child 27 5cc2995847ea
equal deleted inserted replaced
25:b183ec05bd8c 26:19bba8228ff0
     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 fotaserver component
       
    15 * 	This is part of fotaapplication.
       
    16 *
       
    17 */
       
    18 
       
    19 #ifndef FMSDEBUG_H_
       
    20 #define FMSDEBUG_H_
       
    21 	
       
    22 
       
    23    #ifdef _FOTA_DEBUG
       
    24 
       
    25         #include <e32std.h>
       
    26         #include <f32file.h>
       
    27         #include <flogger.h>
       
    28         #include <e32svr.h>
       
    29 
       
    30         _LIT( KLogFile, "fmsserver.log" );
       
    31         _LIT( KLogDirFullName, "c:\\logs\\" );
       
    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 
       
    65 #endif /*FMSDEBUG_H_*/