textinput/peninputhwrboxcn/inc/peninputhwrdebug.h
changeset 0 eb1f2e154e89
equal deleted inserted replaced
-1:000000000000 0:eb1f2e154e89
       
     1 /*
       
     2 * Copyright (c) 2002-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 utils API
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef AKNFEPHWRDEBUG_H
       
    20 #define AKNFEPHWRDEBUG_H
       
    21  
       
    22 #ifdef _DEBUG
       
    23     #define PRINT( txt )                    RDebug::Print( txt );
       
    24     #define PRINTF( txt )                   RDebug::Print txt;
       
    25     #define PRINT1( txt, arg1 )             RDebug::Print( txt, arg1 );
       
    26     #define PRINT2( txt, arg1, arg2 )       RDebug::Print( txt, arg1, arg2 );
       
    27     #define PRINT3( txt, arg1, arg2, arg3 ) RDebug::Print( txt, arg1, arg2, arg3 ); 
       
    28 #else 
       
    29     #define PRINT( txt ) 
       
    30     #define PRINTF( txt )                    
       
    31     #define PRINT1( txt, arg1 ) 
       
    32     #define PRINT2( txt, arg1, arg2 ) 
       
    33     #define PRINT3( txt, arg1, arg2, arg3 ) 
       
    34 #endif
       
    35 
       
    36 
       
    37 // Record into log files
       
    38 #define USE_FILE_LOGGER
       
    39 
       
    40 #if defined (_DEBUG) && !defined(USE_FILE_LOGGER)                   
       
    41     #define USE_SERIAL_LOGGER 
       
    42 #endif
       
    43                                     
       
    44 #if defined (USE_FILE_LOGGER)
       
    45     #include <flogger.h>
       
    46     _LIT(KLogFile,"ocrsrv.txt");
       
    47     _LIT(KLogFolder,"ocr");
       
    48     #define LOGTEXT(AAA)                RFileLogger::Write(KLogFolder(),KLogFile(),EFileLoggingModeAppend,AAA)
       
    49     #define LOGTEXT2(AAA,BBB)           RFileLogger::WriteFormat(KLogFolder(),KLogFile(),EFileLoggingModeAppend,TRefByValue<const TDesC>(AAA),BBB)
       
    50     #define LOGTEXT3(AAA,BBB,CCC)       RFileLogger::WriteFormat(KLogFolder(),KLogFile(),EFileLoggingModeAppend,TRefByValue<const TDesC>(AAA),BBB,CCC)
       
    51     #define LOGHEXDUMP(AAA,BBB,CCC,DDD) RFileLogger::HexDump(KLogFolder(),KLogFile(),EFileLoggingModeAppend,AAA,BBB,CCC,DDD)    
       
    52 #elif defined (USE_SERIAL_LOGGER) 
       
    53     #include <e32svr.h>
       
    54     #define LOGTEXT(AAA)                RDebug::Print(AAA)
       
    55     #define LOGTEXT2(AAA,BBB)           RDebug::Print(AAA,BBB)
       
    56     #define LOGTEXT3(AAA,BBB,CCC)       RDebug::Print(AAA,BBB,CCC)
       
    57     #define LOGHEXDUMP(AAA,BBB,CCC,DDD)
       
    58 #else
       
    59     #define LOGTEXT(AAA)                
       
    60     #define LOGTEXT2(AAA,BBB)           
       
    61     #define LOGTEXT3(AAA,BBB,CCC)       
       
    62     #define LOGHEXDUMP(AAA,BBB,CCC,DDD) 
       
    63 #endif      
       
    64 
       
    65 #endif      // AKNFEPHWRDEBUG_H   
       
    66             
       
    67 // End Of File