1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/epoc32/include/tools/coredump/debuglogging.h Wed Mar 31 12:33:34 2010 +0100
1.3 @@ -0,0 +1,54 @@
1.4 +// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// 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
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +// Logging macros for use in debug subsystem
1.18 +//
1.19 +
1.20 +
1.21 +
1.22 +/**
1.23 + @file
1.24 + @internalTechnology
1.25 + @released
1.26 +*/
1.27 +
1.28 +#ifndef DEBUG_LOGGING_H
1.29 +#define DEBUG_LOGGING_H
1.30 +
1.31 +/*
1.32 + * Debug messages are only generated for debug builds.
1.33 + */
1.34 +
1.35 +#ifdef CDSDEBUG
1.36 +
1.37 + #include <e32debug.h>
1.38 + #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();} }
1.39 +
1.40 + #define LOG_MSG( a ) RDebug::Printf( a )
1.41 + #define LOG_MSG2( a, b ) RDebug::Printf( a, b )
1.42 + #define LOG_MSG3( a, b, c ) RDebug::Printf( a, b, c )
1.43 + #define LOG_MSG4( a, b, c, d ) RDebug::Printf( a, b, c, d )
1.44 + #define LOG_MSG5( a, b, c, d, e ) RDebug::Printf( a, b, c, d, e )
1.45 +
1.46 +#else
1.47 +
1.48 + #define LOG_DES(des)
1.49 + #define LOG_MSG( a )
1.50 + #define LOG_MSG2( a, b )
1.51 + #define LOG_MSG3( a, b, c )
1.52 + #define LOG_MSG4( a, b, c, d )
1.53 + #define LOG_MSG5( a, b, c, d, e )
1.54 +
1.55 +#endif
1.56 +
1.57 +#endif //DEBUG_LOGGING_H