os/persistentdata/persistentstorage/centralrepository/common/inc/log.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 // Copyright (c) 2005-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 CENTREP_LOG_H
    17 #define CENTREP_LOG_H
    18 
    19 #include <e32debug.h>
    20 
    21 //
    22 // MACROs for trace statements in client/server code.
    23 //
    24 
    25 #ifdef CENTREP_TRACE
    26 
    27 #define __CENTREP_TRACE(_text)			RDebug::Print(_L(_text))
    28 #define __CENTREP_TRACE1(_text, _a1)		RDebug::Print(_L(_text), (_a1))
    29 #define __CENTREP_TRACE2(_text, _a1, _a2)		RDebug::Print(_L(_text), (_a1), (_a2))
    30 #define __CENTREP_TRACE3(_text, _a1, _a2, _a3)	RDebug::Print(_L(_text), (_a1), (_a2), (_a3))
    31 
    32 #else
    33 
    34 #define __CENTREP_TRACE(_text)			
    35 #define __CENTREP_TRACE1(_text, _a1)		
    36 #define __CENTREP_TRACE2(_text, _a1, _a2)
    37 #define __CENTREP_TRACE3(_text, _a1, _a2, _a3)	
    38 
    39 #endif
    40 
    41 // macro for trace statements of just the server subsession 
    42 // note: this is needed for greater granularity than the centrep_trace macro
    43 // offers
    44 
    45 
    46 #ifdef SRVSUBSESS_TRACE
    47 
    48 #define __SRVSUBSESS_TRACE(_text)			RDebug::Print(_L(_text))
    49 #define __SRVSUBSESS_TRACE1(_text, _a1)		RDebug::Print(_L(_text), (_a1))
    50 #define __SRVSUBSESS_TRACE2(_text, _a1, _a2)		RDebug::Print(_L(_text), (_a1), (_a2))
    51 #define __SRVSUBSESS_TRACE3(_text, _a1, _a2, _a3)	RDebug::Print(_L(_text), (_a1), (_a2), (_a3))
    52 #define __SRVSUBSESS_TRACE4(_text, _a1, _a2, _a3, _a4)	RDebug::Print(_L(_text), (_a1), (_a2), (_a3),(_a4))
    53 
    54 #else
    55 
    56 #define __SRVSUBSESS_TRACE(_text)			
    57 #define __SRVSUBSESS_TRACE1(_text, _a1)		
    58 #define __SRVSUBSESS_TRACE2(_text, _a1, _a2)
    59 #define __SRVSUBSESS_TRACE3(_text, _a1, _a2, _a3)	
    60 #define __SRVSUBSESS_TRACE4(_text, _a1, _a2, _a3, _a4)
    61 
    62 #endif
    63 
    64 
    65 #endif // CENTREP_LOG_H
    66