williamr@4
|
1 |
// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
|
williamr@4
|
2 |
// All rights reserved.
|
williamr@4
|
3 |
// This component and the accompanying materials are made available
|
williamr@4
|
4 |
// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
|
williamr@4
|
5 |
// which accompanies this distribution, and is available
|
williamr@4
|
6 |
// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
|
williamr@4
|
7 |
//
|
williamr@4
|
8 |
// Initial Contributors:
|
williamr@4
|
9 |
// Nokia Corporation - initial contribution.
|
williamr@4
|
10 |
//
|
williamr@4
|
11 |
// Contributors:
|
williamr@4
|
12 |
//
|
williamr@4
|
13 |
// Description:
|
williamr@4
|
14 |
// Logging macros for use in debug subsystem
|
williamr@4
|
15 |
//
|
williamr@4
|
16 |
|
williamr@4
|
17 |
|
williamr@4
|
18 |
|
williamr@4
|
19 |
/**
|
williamr@4
|
20 |
@file
|
williamr@4
|
21 |
@internalTechnology
|
williamr@4
|
22 |
@released
|
williamr@4
|
23 |
*/
|
williamr@4
|
24 |
|
williamr@4
|
25 |
#ifndef DEBUG_LOGGING_H
|
williamr@4
|
26 |
#define DEBUG_LOGGING_H
|
williamr@4
|
27 |
|
williamr@4
|
28 |
/*
|
williamr@4
|
29 |
* Debug messages are only generated for debug builds.
|
williamr@4
|
30 |
*/
|
williamr@4
|
31 |
|
williamr@4
|
32 |
#ifdef CDSDEBUG
|
williamr@4
|
33 |
|
williamr@4
|
34 |
#include <e32debug.h>
|
williamr@4
|
35 |
#define LOG_DES(des) {if(des.Length() > 0) {RBuf buf; buf.CreateL(des); char *ptr = (char*)buf.Collapse().PtrZ(); LOG_MSG2("\n(%s)\n", ptr); buf.Close();} }
|
williamr@4
|
36 |
|
williamr@4
|
37 |
#define LOG_MSG( a ) RDebug::Printf( a )
|
williamr@4
|
38 |
#define LOG_MSG2( a, b ) RDebug::Printf( a, b )
|
williamr@4
|
39 |
#define LOG_MSG3( a, b, c ) RDebug::Printf( a, b, c )
|
williamr@4
|
40 |
#define LOG_MSG4( a, b, c, d ) RDebug::Printf( a, b, c, d )
|
williamr@4
|
41 |
#define LOG_MSG5( a, b, c, d, e ) RDebug::Printf( a, b, c, d, e )
|
williamr@4
|
42 |
|
williamr@4
|
43 |
#else
|
williamr@4
|
44 |
|
williamr@4
|
45 |
#define LOG_DES(des)
|
williamr@4
|
46 |
#define LOG_MSG( a )
|
williamr@4
|
47 |
#define LOG_MSG2( a, b )
|
williamr@4
|
48 |
#define LOG_MSG3( a, b, c )
|
williamr@4
|
49 |
#define LOG_MSG4( a, b, c, d )
|
williamr@4
|
50 |
#define LOG_MSG5( a, b, c, d, e )
|
williamr@4
|
51 |
|
williamr@4
|
52 |
#endif
|
williamr@4
|
53 |
|
williamr@4
|
54 |
#endif //DEBUG_LOGGING_H
|