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