williamr@4: // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). williamr@4: // All rights reserved. williamr@4: // This component and the accompanying materials are made available williamr@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: // which accompanies this distribution, and is available williamr@4: // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". williamr@4: // williamr@4: // Initial Contributors: williamr@4: // Nokia Corporation - initial contribution. williamr@4: // williamr@4: // Contributors: williamr@4: // williamr@4: // Description: williamr@4: // Logging macros for use in debug subsystem williamr@4: // williamr@4: williamr@4: williamr@4: williamr@4: /** williamr@4: @file williamr@4: @internalTechnology williamr@4: @released williamr@4: */ williamr@4: williamr@4: #ifndef DEBUG_LOGGING_H williamr@4: #define DEBUG_LOGGING_H williamr@4: williamr@4: /* williamr@4: * Debug messages are only generated for debug builds. williamr@4: */ williamr@4: williamr@4: #ifdef CDSDEBUG williamr@4: williamr@4: #include williamr@4: #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: williamr@4: #define LOG_MSG( a ) RDebug::Printf( a ) williamr@4: #define LOG_MSG2( a, b ) RDebug::Printf( a, b ) williamr@4: #define LOG_MSG3( a, b, c ) RDebug::Printf( a, b, c ) williamr@4: #define LOG_MSG4( a, b, c, d ) RDebug::Printf( a, b, c, d ) williamr@4: #define LOG_MSG5( a, b, c, d, e ) RDebug::Printf( a, b, c, d, e ) williamr@4: williamr@4: #else williamr@4: williamr@4: #define LOG_DES(des) williamr@4: #define LOG_MSG( a ) williamr@4: #define LOG_MSG2( a, b ) williamr@4: #define LOG_MSG3( a, b, c ) williamr@4: #define LOG_MSG4( a, b, c, d ) williamr@4: #define LOG_MSG5( a, b, c, d, e ) williamr@4: williamr@4: #endif williamr@4: williamr@4: #endif //DEBUG_LOGGING_H