imservices/ossprotocoladaptation/inc/ossprotocolpluginlogger.h
branchRCL_3
changeset 14 7797b2f86d2b
parent 13 b6f2a363adf7
child 16 cfe5eb8bb9ca
equal deleted inserted replaced
13:b6f2a363adf7 14:7797b2f86d2b
     1 /*
       
     2 * Copyright (c) 2007-2008 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 implementation
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef __TLOGGER_H__
       
    20 #define __TLOGGER_H__
       
    21 
       
    22 //  INCLUDES
       
    23 #include <e32std.h>
       
    24 
       
    25 //#ifdef _DEBUG
       
    26 #define ENABLE_DEBUG_LOGS
       
    27 //#endif
       
    28 
       
    29 /**   
       
    30 * Usage of Log MACRO'S
       
    31 * _LIT( KExample, "Example" );
       
    32 *  TXT(s) _L(s)	
       
    33 *  LOGGER(TXT("Some text.") );
       
    34 *  LOGGER(TXT("Some text: %d"), 100 );
       
    35 *  LOGGER(TXT("Some text: %S"), &KExample );
       
    36 */
       
    37 
       
    38 _LIT( KTAdaptDebugOutputDir, "os" );
       
    39 _LIT( KTAdaptDebugOutputFileName, "ossadapt.txt" );
       
    40 const TInt KTAdaptMaxLogLineLength = 250 ;
       
    41 //#ifdef _DEBUG
       
    42 
       
    43 #define TXT(s) _L(s)
       
    44 #define LOGGER TLogger::WriteLog
       
    45 #define PLUGIN_UNUSED_PARAM(p) (void) p
       
    46 //#endif
       
    47 
       
    48 /**
       
    49  * OSS Protocol Adaptation logger.
       
    50  */
       
    51 class TLogger
       
    52     {
       
    53     public: //Logging functions
       
    54 		static void WriteLog( TRefByValue<const TDesC> aFmt,... );
       
    55     private: //Prohibited construtor / destructor
       
    56         TLogger();
       
    57         ~TLogger();
       
    58     };
       
    59 #endif  //__TLOGGER_H__
       
    60 
       
    61 // End of File