omacp/omacpadapters/EmailAdapter/src/CWPEmailLog.h
changeset 0 3ce708148e4d
equal deleted inserted replaced
-1:000000000000 0:3ce708148e4d
       
     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: 
       
    15 *     Logging class
       
    16 *     
       
    17 *
       
    18 */
       
    19 
       
    20 
       
    21 
       
    22 #ifndef Log_H
       
    23 #define Log_H
       
    24 
       
    25 /////////////////////////////////////////////////////////////////////////////
       
    26 // #Defines that control printing of additional information to debug stream.
       
    27 /////////////////////////////////////////////////////////////////////////////
       
    28 
       
    29 // INCLUDES
       
    30 
       
    31 #include "LogDef.h"
       
    32 #include <e32std.h>
       
    33 
       
    34 // DEFINES
       
    35 
       
    36 #ifdef ENABLE_LOGGING
       
    37 #define LOG(s) Log::DoLog(_L(s))
       
    38 #define LOG1(s, v) Log::DoLog( _L(s), v )
       
    39 #define LOG2(s, v1, v2) Log::DoLog( _L(s), v1, v2 )
       
    40 #else
       
    41 #define LOG(s)
       
    42 #define LOG1(s, v)
       
    43 #define LOG2(s, v1, v2)
       
    44 #endif // ENABLE_LOGGING
       
    45 
       
    46 // DATA TYPES
       
    47 
       
    48 
       
    49 // CLASS DECLARATION
       
    50 
       
    51 /**
       
    52 * Class offers logging functionality.
       
    53 */
       
    54 class Log
       
    55     {
       
    56 
       
    57     public:
       
    58 
       
    59         /**
       
    60         * Log the message.
       
    61 		* @param aText text to be written to log.
       
    62         */
       
    63         static void DoLog( TRefByValue<const TDesC> aText, ... );
       
    64 
       
    65     private: // constructor
       
    66         
       
    67 		/// Prohibited default constructor
       
    68 		Log();
       
    69 
       
    70 		/// Prohibited copy constructor
       
    71 		Log( const Log& );
       
    72     
       
    73 		/// Prohibited assignment operator
       
    74 		Log& operator=( const Log& );
       
    75     };
       
    76 
       
    77 #endif // Log_H
       
    78 
       
    79 //  End of File