mmappcomponents/asxparser/inc/AsxParser_debug.h
branchRCL_3
changeset 9 bee149131e4b
parent 0 a2952bb97e68
child 25 d881023c13eb
child 55 6c1dfe4da5dd
equal deleted inserted replaced
4:d45095c2f4f3 9:bee149131e4b
     1 /*
     1 /*
     2 * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
     2 * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
    13 *
    13 *
    14 * Description:  Defines macro for debug output
    14 * Description:  Defines macro for debug output
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 // Version : %version: 4.1.1 %
    18 // Version : %version: 4.1.2 %
    19 
       
    20 
    19 
    21 
    20 
    22 #ifndef __MP_DEBUG_H__
    21 #ifndef __MP_DEBUG_H__
    23 #define __MP_DEBUG_H__
    22 #define __MP_DEBUG_H__
    24 
    23 
    25 #include <e32svr.h>
    24 #include <e32svr.h>
    26 #include <e32def.h>
    25 #include <e32def.h>
    27 #include <flogger.h>
       
    28 
       
    29 //
       
    30 //  Forward declaration
       
    31 //
       
    32 class AsxParserDebug;
       
    33 
       
    34 // #ifdef __MARM__
       
    35 //     #define _ASX_PARSER_FILE_LOGGING_
       
    36 // #endif
       
    37 
       
    38 #ifdef _ASX_PARSER_FILE_LOGGING_
       
    39     #define ASX_DEBUG AsxParserDebug::FileLog
       
    40 #else
       
    41     #ifdef _DEBUG
       
    42         #define ASX_DEBUG RDebug::Print
       
    43     #else
       
    44          #define ASX_DEBUG AsxParserDebug::NullLog
       
    45     #endif
       
    46 #endif 
       
    47 
    26 
    48 class AsxParserDebug
    27 class AsxParserDebug
    49 {
    28 {
    50     public:
    29     public:
    51         inline static void NullLog(TRefByValue<const TDesC16> /*aFmt*/,...)
    30         inline static void NullLog( TRefByValue<const TDesC16> /*aFmt*/, ... )
    52         {
    31         {
    53         }	
       
    54 
       
    55         inline static void FileLog(TRefByValue<const TDesC16> aFmt,...)
       
    56         {
       
    57             VA_LIST list;
       
    58             VA_START(list,aFmt);
       
    59             RFileLogger::WriteFormat(_L("AsxParser"), _L("ap.log"),EFileLoggingModeAppend,aFmt,list);
       
    60         }
    32         }
    61 };
    33 };
    62 
    34 
       
    35 #ifdef _DEBUG
       
    36     #define ASX_DEBUG   RDebug::Print
       
    37 #else
       
    38     #define ASX_DEBUG   AsxParserDebug::NullLog
       
    39 #endif
       
    40 
       
    41 
    63 #endif // __MP_DEBUG_H__
    42 #endif // __MP_DEBUG_H__