commonservices/sysutil/src/sysutildebug.h
changeset 0 4e1aa6a622a0
equal deleted inserted replaced
-1:000000000000 0:4e1aa6a622a0
       
     1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 #ifndef SYSUTILDEBUG_H
       
    17 #define SYSUTILDEBUG_H
       
    18 
       
    19 #include <e32debug.h>
       
    20 
       
    21 // Make sure release builds get a warning if 
       
    22 #ifndef _DEBUG
       
    23 #if (defined SYMBIAN_BAFL_SYSUTIL_TRACE)
       
    24 #warning "Use of RDebug::Print tracing in a release build, check MMP files"
       
    25 #endif
       
    26 #endif
       
    27 
       
    28 //
       
    29 // MACROs for trace statements in client/server code.
       
    30 //
       
    31 
       
    32 #ifdef SYMBIAN_BAFL_SYSUTIL_TRACE
       
    33 
       
    34 #define __SYSUTIL_TRACE(_text)		RDebug::Print(_L(_text))
       
    35 #define __SYSUTIL_TRACE1(_text, _a1)	RDebug::Print(_L(_text), (_a1))
       
    36 #define __SYSUTIL_TRACE2(_text, _a1, _a2)	RDebug::Print(_L(_text), (_a1), (_a2))
       
    37 #define __SYSUTIL_TRACE3(_text, _a1, _a2, _a3)	RDebug::Print(_L(_text), (_a1), (_a2), (_a3))
       
    38 #define __SYSUTIL_TRACE4(_text, _a1, _a2, _a3, _a4)	RDebug::Print(_L(_text), (_a1), (_a2), (_a3), (_a4))
       
    39 #define __SYSUTIL_TRACE5(_text, _a1, _a2, _a3, _a4, _a5)	RDebug::Print(_L(_text), (_a1), (_a2), (_a3), (_a4), (_a5))
       
    40 #define __SYSUTIL_TRACE6(_text, _a1, _a2, _a3, _a4, _a5, _a6)	RDebug::Print(_L(_text), (_a1), (_a2), (_a3), (_a4), (_a5), (_a6))
       
    41 
       
    42 
       
    43 #else
       
    44 
       
    45 #define __SYSUTIL_TRACE(_text)			
       
    46 #define __SYSUTIL_TRACE1(_text, _a1)		
       
    47 #define __SYSUTIL_TRACE2(_text, _a1, _a2)
       
    48 #define __SYSUTIL_TRACE3(_text, _a1, _a2, _a3)	
       
    49 #define __SYSUTIL_TRACE4(_text, _a1, _a2, _a3, _a4)
       
    50 #define __SYSUTIL_TRACE5(_text, _a1, _a2, _a3, _a4, _a5)
       
    51 #define __SYSUTIL_TRACE6(_text, _a1, _a2, _a3, _a4, _a5, _a6)
       
    52 
       
    53 #endif
       
    54 
       
    55 #endif // SYSUTILDEBUG_H
       
    56