profilesservices/MediaFileList/Inc/mediafilelistdebug.h
changeset 68 13e71d907dc3
parent 0 8c5d936e5675
equal deleted inserted replaced
40:6465d5bb863a 68:13e71d907dc3
       
     1 /*
       
     2 * Copyright (c) 2007 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:   Tools for making logs
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifdef _DEBUG
       
    21 
       
    22 #include <e32svr.h>
       
    23 #include <e32std.h>
       
    24 #include <f32file.h>
       
    25 #include <flogger.h>
       
    26 
       
    27 _LIT(KLogFileName,"mfl.txt");
       
    28 _LIT(KLogDirFullName,"c:\\logs\\");
       
    29 _LIT(KLogDir,"mfl");
       
    30 
       
    31 // Declare the FPrint function
       
    32 inline void FPrint(const TRefByValue<const TDesC> aFmt, ...)
       
    33     {
       
    34     VA_LIST list;
       
    35     VA_START(list,aFmt);
       
    36     RFileLogger::WriteFormat(KLogDir, KLogFileName, EFileLoggingModeAppend, aFmt, list);
       
    37     }
       
    38 
       
    39 // ===========================================================================
       
    40 #ifdef __WINS__     // File logging for WINS
       
    41 // ===========================================================================
       
    42 #define FLOG(arg...)   { FPrint(arg); }
       
    43 //#define FLOG(a) { RDebug::Print(a);  }
       
    44 #define FTRACE(a) { a; }
       
    45 // ===========================================================================
       
    46 #else               // RDebug logging for target HW
       
    47 // ===========================================================================
       
    48 //#define FLOG(arg...) { RDebug::Print(arg);  }
       
    49 #define FLOG(arg...)   { FPrint(arg); }
       
    50 #define FTRACE(a) { a; }
       
    51 #endif //__WINS__
       
    52 
       
    53 // ===========================================================================
       
    54 #else // // No loggings --> Reduced binary size
       
    55 // ===========================================================================
       
    56 #define FLOG(arg...)
       
    57 #define FTRACE(a)
       
    58 
       
    59 #endif // _DEBUG
       
    60 
       
    61 // End of File