imstutils/xmppadapter/inc/xmppadapterlogger.h
branchRCL_3
changeset 28 3104fc151679
parent 27 2b7283837edb
child 29 9a48e301e94b
equal deleted inserted replaced
27:2b7283837edb 28:3104fc151679
     1 /*
       
     2 * Copyright (c) 2009 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:  XMPP Logger implementation
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef XMPPADAPTERLOGGER_H
       
    20 #define XMPPADAPTERLOGGER_H
       
    21 
       
    22 //  INCLUDES
       
    23 #include <e32std.h>
       
    24 
       
    25 //#ifdef _DEBUG
       
    26 #ifdef __WINS__
       
    27   #ifdef _DEBUG
       
    28     #define ENABLE_DEBUG_LOGS // for WINS UDEB
       
    29  #endif
       
    30 #else
       
    31   #ifdef _DEBUG
       
    32     #define ENABLE_DEBUG_LOGS // for device UDEB
       
    33   #endif
       
    34 #endif
       
    35 
       
    36 /**   
       
    37 * Usage of Log MACRO'S
       
    38 * _LIT( KExample, "Example" );
       
    39 *  TXT(s) _L(s)	
       
    40 *  LOGGER(TXT("Some text.") );
       
    41 *  LOGGER(TXT("Some text: %d"), 100 );
       
    42 *  LOGGER(TXT("Some text: %S"), &KExample );
       
    43 */
       
    44 
       
    45 _LIT( KTAdaptDebugOutputDir, "xa" );
       
    46 _LIT( KTAdaptDebugOutputFileName, "xa.txt" );
       
    47 const TInt KTAdaptMaxLogLineLength = 250 ;
       
    48 //#ifdef _DEBUG
       
    49 
       
    50 #define TXT(s) _L(s)
       
    51 #define LOGGER TLogger::WriteLog
       
    52 #define PLUGIN_UNUSED_PARAM(p) (void) p
       
    53 //#endif
       
    54 
       
    55 /**
       
    56  * OSS Protocol Adaptation logger.
       
    57  */
       
    58 class TLogger
       
    59     {
       
    60     public: //Logging functions
       
    61 		static void WriteLog( TRefByValue<const TDesC> aFmt,... );
       
    62     private: //Prohibited construtor / destructor
       
    63         TLogger();
       
    64         ~TLogger();
       
    65     };
       
    66 #endif  //XMPPADAPTERLOGGER_H
       
    67 
       
    68 // End of File