terminalsecurity/SCP/DmEventNotifier/inc/DmEventNotifierDebug.h
changeset 0 b497e44ab2fc
child 5 3f7d9dbe57c8
equal deleted inserted replaced
-1:000000000000 0:b497e44ab2fc
       
     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: This header contains the debug macros used by the application
       
    15 *
       
    16 */
       
    17 #ifndef __DMEVENTNOTIFIERDEBUG_H__
       
    18 #define __DMEVENTNOTIFIERDEBUG_H__
       
    19 
       
    20 #include <e32std.h>
       
    21 #include <f32file.h>
       
    22 #include <flogger.h>
       
    23 #include <e32svr.h>
       
    24 
       
    25 _LIT( KLogFile, "DmEventNotifier.log" );
       
    26 _LIT( KLogDirFullName, "c:\\logs\\" );
       
    27 _LIT( KLogDir, "tarm" );
       
    28 
       
    29 inline void FWrite (TRefByValue<const TDesC> aFmt,...)
       
    30     {
       
    31     VA_LIST list;
       
    32     VA_START( list, aFmt );
       
    33     RFileLogger::WriteFormat( KLogDir,KLogFile,EFileLoggingModeAppend ,TPtrC(aFmt) ,list );
       
    34     }
       
    35 
       
    36 #if defined (_DEBUG)
       
    37 
       
    38 #if defined(__WINS__)
       
    39     #define FLOG            RDebug::Print
       
    40     #define FLOG(arg...)    RDebug::Print(arg);
       
    41 #else
       
    42     #define FLOG            FWrite
       
    43     #define FLOG(arg...)    FWrite(arg);
       
    44 #endif
       
    45 
       
    46 #else
       
    47 	#define FLOG
       
    48 	#define FLOG(arg...)
       
    49 	
       
    50 #endif //_DEBUG
       
    51 #endif      // __DMEVENTNOTIFIERDEBUG_H__
       
    52 // End of File