omads/omadsappui/AspScheduleHandler/inc/AspDebug.h
changeset 0 dab8a81a92de
equal deleted inserted replaced
-1:000000000000 0:dab8a81a92de
       
     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:  
       
    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 
       
    36 // Declare the FPrint function
       
    37 inline void FPrint(const TRefByValue<const TDesC> aFmt, ...)
       
    38     {
       
    39     VA_LIST list;
       
    40     VA_START(list,aFmt);
       
    41     RFileLogger::WriteFormat(KLogDir, KLogFile, EFileLoggingModeAppend, aFmt, list);
       
    42     }
       
    43 
       
    44 // ===========================================================================
       
    45 #ifdef __WINS__     // File logging for WINS
       
    46 // ===========================================================================
       
    47 #define FLOG(a)   { FPrint(a); }
       
    48 //#define FLOG(a) { RDebug::Print(a);  }
       
    49 #define FTRACE(a) { a; }
       
    50 // ===========================================================================
       
    51 #else               // RDebug logging for target HW
       
    52 // ===========================================================================
       
    53 #define FLOG(a) { RDebug::Print(a);  }
       
    54 #define FTRACE(a) { a; }
       
    55 #endif //__WINS__
       
    56 
       
    57 // ===========================================================================
       
    58 #else // // No loggings --> Reduced binary size
       
    59 // ===========================================================================
       
    60 #define FLOG(a)
       
    61 #define FTRACE(a)
       
    62 
       
    63 #endif // _DEBUG
       
    64 
       
    65 
       
    66 #endif // NSMLDSSYNC__DEBUG_H
       
    67 
       
    68 // End of File