devicemgmtnotifications/dmdevdialogclient/inc/dmdevdialogclientdebug.h
branchRCL_3
changeset 25 b183ec05bd8c
equal deleted inserted replaced
24:13d7c31c74e0 25:b183ec05bd8c
       
     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 Dm device dialog client
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef DEVDIALOG_CLIENT_DEBUG_H_
       
    19 #define DEVDIALOG_CLIENT_DEBUG_H_
       
    20 #ifdef _DEBUG
       
    21    #ifdef _DEVDIALOG_DEBUG
       
    22 #endif
       
    23         #include <e32std.h>
       
    24         #include <f32file.h>
       
    25         #include <flogger.h>
       
    26         #include <e32svr.h>
       
    27 
       
    28         _LIT( KLogFile, "devdiag.log" );
       
    29         _LIT( KLogDirFullName, "c:\\logs\\" );
       
    30         _LIT( KLogDir, "DMDD" );
       
    31 
       
    32         inline void FWrite (TRefByValue<const TDesC> aFmt,...)
       
    33             {
       
    34             VA_LIST list;
       
    35             VA_START( list, aFmt );
       
    36             RFileLogger::WriteFormat( KLogDir,KLogFile,EFileLoggingModeAppend ,TPtrC(aFmt) ,list );
       
    37             }
       
    38 
       
    39 
       
    40         #ifdef __DEVDIALOG_DEBUG_RDEBUG 
       
    41             #ifndef __GNUC__          
       
    42                 #define FLOG            RDebug::Print
       
    43             #else   // __GNUC__       
       
    44                 #define FLOG(arg...)    RDebug::Print(arg);
       
    45             #endif // __GNUC__        
       
    46         #else //__DEVDIALOG_DEBUG_RDEBUG
       
    47             #ifndef __GNUC__          
       
    48                 #define FLOG            FWrite
       
    49             #else   // __GNUC__       
       
    50                 #define FLOG(arg...)    FWrite(arg);
       
    51             #endif // __GNUC__        
       
    52         #endif // __DEVDIALOG_DEBUG_RDEBUG
       
    53 
       
    54     #else   // _DEVDIALOG_DEBUG
       
    55         #ifndef __GNUC__
       
    56             #define FLOG
       
    57         #else
       
    58             #define FLOG(arg...)
       
    59         #endif // __GNUC__
       
    60     #endif // _DEVDIALOG_DEBUG
       
    61 
       
    62 
       
    63 #endif /*FMSCLIENTDEBUG_H_*/