messagingappbase/sendui/inc/SendUiLog.h
changeset 0 72b543305e3a
equal deleted inserted replaced
-1:000000000000 0:72b543305e3a
       
     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 SendUi.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #ifndef SENDUILOG_H
       
    22 #define SENDUILOG_H
       
    23 
       
    24 // MACROS
       
    25 
       
    26 #include <flogger.h>                    // HW debug logging support
       
    27 
       
    28 //
       
    29 #ifdef USE_LOGGER
       
    30 //
       
    31 
       
    32 _LIT(KSendUiLogFile,"SENDUI.TXT");
       
    33 _LIT(KSendUiLogDir,"SENDUI");
       
    34 _LIT(KSendUiTimeFormatString,"%H:%T:%S:%*C2");
       
    35 
       
    36 #define CREATELOGTEXT(a)    RFileLogger::Write(KSendUiLogDir(),KSendUiLogFile(),EFileLoggingModeOverwrite,a)
       
    37 #define LOGTEXT(a)          RFileLogger::Write(KSendUiLogDir(),KSendUiLogFile(),EFileLoggingModeAppend,a)
       
    38 #define LOGTEXT2(a,b)       RFileLogger::WriteFormat(KSendUiLogDir(),KSendUiLogFile(),EFileLoggingModeAppend,TRefByValue<const TDesC>(a),b)
       
    39 #define LOGTEXT3(a,b,c)     RFileLogger::WriteFormat(KSendUiLogDir(),KSendUiLogFile(),EFileLoggingModeAppend,TRefByValue<const TDesC>(a),b,c)
       
    40 #define LOGHEXDUMP(a,b,c,d) RFileLogger::HexDump(KSendUiLogDir(),KSendUiLogFile(),EFileLoggingModeAppend,a,b,c,d);
       
    41 #define LOGTIMESTAMP(a)     {_LIT(temp, a); TTime time; time.HomeTime(); TBuf<256> buffer; time.FormatL( buffer, KSendUiTimeFormatString ); buffer.Insert(0, temp); RFileLogger::Write(KSendUiLogDir, KSendUiLogFile, 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 // SENDUILOG_H
       
    55             
       
    56 // End of File