messagingfw/deprecate/senduiservices/inc/senduiserviceslog.h
branchRCL_3
changeset 22 d2c4c66342f3
equal deleted inserted replaced
21:e5b3a2155e1a 22:d2c4c66342f3
       
     1 /*
       
     2 * Copyright (c) 2002 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:   Logger facility for the SendUiServices.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #ifndef SENDUISERVICESLOG_H
       
    22 #define SENDUISERVICESLOG_H
       
    23 
       
    24 // MACROS
       
    25 
       
    26 #include <flogger.h>                    // HW debug logging support
       
    27 
       
    28 //
       
    29 #ifdef USE_LOGGER
       
    30 //
       
    31 
       
    32 _LIT(KSendUiServicesLogFile,"SENDUISERVICES.TXT");
       
    33 _LIT(KSendUiServicesLogDir,"SENDUISERVICES");
       
    34 _LIT(KSendUiServicesTimeFormatString,"%H:%T:%S:%*C2");
       
    35 
       
    36 #define CREATELOGTEXT(a)    RFileLogger::Write(KSendUiServicesLogDir(),KSendUiServicesLogFile(),EFileLoggingModeOverwrite,a)
       
    37 #define LOGTEXT(a)          RFileLogger::Write(KSendUiServicesLogDir(),KSendUiServicesLogFile(),EFileLoggingModeAppend,a)
       
    38 #define LOGTEXT2(a,b)       RFileLogger::WriteFormat(KSendUiServicesLogDir(),KSendUiServicesLogFile(),EFileLoggingModeAppend,TRefByValue<const TDesC>(a),b)
       
    39 #define LOGTEXT3(a,b,c)     RFileLogger::WriteFormat(KSendUiServicesLogDir(),KSendUiServicesLogFile(),EFileLoggingModeAppend,TRefByValue<const TDesC>(a),b,c)
       
    40 #define LOGHEXDUMP(a,b,c,d) RFileLogger::HexDump(KSendUiServicesLogDir(),KSendUiServicesLogFile(),EFileLoggingModeAppend,a,b,c,d);
       
    41 #define LOGTIMESTAMP(a)     {_LIT(temp, a); TTime time; time.HomeTime(); TBuf<256> buffer; time.FormatL( buffer, KSendUiServicesTimeFormatString ); buffer.Insert(0, temp); RFileLogger::Write(KSendUiServicesLogDir, KSendUiServicesLogFile, EFileLoggingModeAppend, buffer); }
       
    42 
       
    43 #else // no logger
       
    44 
       
    45 #define CREATELOGTEXT(a)
       
    46 #define LOGTEXT(a)
       
    47 #define LOGTEXT2(a,b)
       
    48 #define LOGTEXT3(a,b,c)
       
    49 #define LOGHEXDUMP(a,b,c,d)
       
    50 #define LOGTIMESTAMP(a)
       
    51 
       
    52 #endif // USE_LOGGER
       
    53 
       
    54 #endif // SENDUISERVICESLOG_H
       
    55             
       
    56 // End of File