camerauis/cameraapp/generic/common/inc/camlogging.h
branchRCL_3
changeset 24 bac7acad7cb3
parent 0 1ddebce53859
equal deleted inserted replaced
23:61bc0f252b2b 24:bac7acad7cb3
       
     1 /*
       
     2 * Copyright (c) 2007 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 *
       
    16 */
       
    17 
       
    18 #ifndef CAM_LOGGING_H
       
    19 #define CAM_LOGGING_H
       
    20 
       
    21 #include <e32debug.h>
       
    22 
       
    23 #ifdef _DEBUG 
       
    24 // Defines used for activeobject tracing.
       
    25 #undef _AO_TRACKING
       
    26 //#define _AO_TRACKING
       
    27 #ifdef _AO_TRACKING
       
    28 #define private public
       
    29 #include <e32base.h>
       
    30 #undef private
       
    31 #endif //_AO_TRACKING
       
    32 #endif //_DEBUG
       
    33 
       
    34 // ---------------------------------------------------------------------------
       
    35 #if !defined( PRINT3 ) 
       
    36   #ifdef  _DEBUG 
       
    37   	#define PRINT( txt )                          RDebug::Print( txt );
       
    38   	#define PRINT1( txt, arg1 )                   RDebug::Print( txt, arg1 );
       
    39   	#define PRINT2( txt, arg1, arg2 )             RDebug::Print( txt, arg1, arg2 );
       
    40   	#define PRINT3( txt, arg1, arg2, arg3 )       RDebug::Print( txt, arg1, arg2, arg3 );
       
    41   	#define PRINT4( txt, arg1, arg2, arg3, arg4 ) RDebug::Print( txt, arg1, arg2, arg3, arg4 );
       
    42   
       
    43   // PRINT_FRQ macros are used for logging of frequently occurring events,
       
    44   // for example draws done every time a viewfinder frame arrives.
       
    45   // By default, logging these is disabled.  
       
    46   #undef LOG_FREQUENT
       
    47   
       
    48   #ifdef LOG_FREQUENT  	
       
    49   	#define PRINT_FRQ( txt )                          RDebug::Print( txt );
       
    50   	#define PRINT_FRQ1( txt, arg1 )                   RDebug::Print( txt, arg1 );
       
    51   	#define PRINT_FRQ2( txt, arg1, arg2 )             RDebug::Print( txt, arg1, arg2 );
       
    52   	#define PRINT_FRQ3( txt, arg1, arg2, arg3 )       RDebug::Print( txt, arg1, arg2, arg3 );
       
    53   	#define PRINT_FRQ4( txt, arg1, arg2, arg3, arg4 ) RDebug::Print( txt, arg1, arg2, arg3, arg4 );
       
    54   #else
       
    55     #define PRINT_FRQ( txt )
       
    56   	#define PRINT_FRQ1( txt, arg1 )
       
    57   	#define PRINT_FRQ2( txt, arg1, arg2 )
       
    58   	#define PRINT_FRQ3( txt, arg1, arg2, arg3 )
       
    59   	#define PRINT_FRQ4( txt, arg1, arg2, arg3, arg4 )   	    
       
    60   #endif // LOG_FREQUENT
       
    61   	  	
       
    62   #else
       
    63   	#define PRINT( txt )
       
    64   	#define PRINT1( txt, arg1 )
       
    65   	#define PRINT2( txt, arg1, arg2 )
       
    66   	#define PRINT3( txt, arg1, arg2, arg3 )
       
    67   	#define PRINT4( txt, arg1, arg2, arg3, arg4 ) 
       
    68   	
       
    69   	#define PRINT_FRQ( txt )
       
    70   	#define PRINT_FRQ1( txt, arg1 )
       
    71   	#define PRINT_FRQ2( txt, arg1, arg2 )
       
    72   	#define PRINT_FRQ3( txt, arg1, arg2, arg3 )
       
    73   	#define PRINT_FRQ4( txt, arg1, arg2, arg3, arg4 )   	
       
    74   	
       
    75   #endif
       
    76 #endif
       
    77 // ---------------------------------------------------------------------------
       
    78 
       
    79 #endif
       
    80