omads/omadsappui/AspSyncUtil/inc/AspDebug.h
branchRCL_3
changeset 25 4f0867e42d62
parent 0 dab8a81a92de
equal deleted inserted replaced
24:8e7494275d3a 25:4f0867e42d62
       
     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: Debug macros definition and constant declaration 
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef NSMLDSSYNC__DEBUG_H
       
    21 #define NSMLDSSYNC__DEBUG_H
       
    22 
       
    23 
       
    24 #ifdef _DEBUG
       
    25 
       
    26 #include <e32svr.h>
       
    27 #include <e32std.h>
       
    28 #include <f32file.h>
       
    29 #include <flogger.h>
       
    30 
       
    31 _LIT(KLogFile,"smlsync.txt");
       
    32 _LIT(KLogDirFullName,"c:\\logs\\");
       
    33 _LIT(KLogDir,"smlsync");
       
    34 
       
    35 // Declare the FPrint function
       
    36 inline void FPrint(const TRefByValue<const TDesC> aFmt, ...)
       
    37     {
       
    38     VA_LIST list;
       
    39     VA_START(list,aFmt);
       
    40     RFileLogger::WriteFormat(KLogDir, KLogFile, EFileLoggingModeAppend, aFmt, list);
       
    41     }
       
    42 
       
    43 // ===========================================================================
       
    44 #ifdef __WINS__     // File logging for WINS
       
    45 // ===========================================================================
       
    46 #define FLOG(arg...)   { FPrint(arg); }
       
    47 //#define FLOG(a) { RDebug::Print(a);  }
       
    48 #define FTRACE(a) { a; }
       
    49 // ===========================================================================
       
    50 #else               // RDebug logging for target HW
       
    51 // ===========================================================================
       
    52 //#define FLOG(arg...) { RDebug::Print(arg);  }
       
    53 #define FLOG(arg...)   { FPrint(arg); }
       
    54 #define FTRACE(a) { a; }
       
    55 #endif //__WINS__
       
    56 
       
    57 // ===========================================================================
       
    58 #else // // No loggings --> Reduced binary size
       
    59 // ===========================================================================
       
    60 #define FLOG(arg...)
       
    61 #define FTRACE(a)
       
    62 
       
    63 #endif // _DEBUG
       
    64 
       
    65 
       
    66 #endif // NSMLDSSYNC__DEBUG_H
       
    67 
       
    68 // End of File