sl@0: // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of the License "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // Logging macros for use in debug subsystem sl@0: // sl@0: // sl@0: sl@0: #ifndef RM_DEBUG_LOGGING_H sl@0: #define RM_DEBUG_LOGGING_H sl@0: sl@0: /* Debug messages sl@0: * sl@0: * Debug messages are only generated for debug builds. sl@0: * sl@0: * For kernel mode, use __KTRACE_OPT(KDEBUGGER, Kern::Printf(), sl@0: * for user mode use RDebug::Printf(). sl@0: * sl@0: */ sl@0: sl@0: #ifdef _DEBUG sl@0: sl@0: #ifdef __KERNEL_MODE__ sl@0: sl@0: #include sl@0: #include sl@0: sl@0: #define LOG_MSG( a ) __KTRACE_OPT(KDEBUGGER, Kern::Printf( a )) sl@0: #define LOG_MSG2( a, b ) __KTRACE_OPT(KDEBUGGER, Kern::Printf( a, b )) sl@0: #define LOG_MSG3( a, b, c ) __KTRACE_OPT(KDEBUGGER, Kern::Printf( a, b, c )) sl@0: #define LOG_MSG4( a, b, c, d ) __KTRACE_OPT(KDEBUGGER, Kern::Printf( a, b, c, d )) sl@0: #define LOG_MSG5( a, b, c, d, e ) __KTRACE_OPT(KDEBUGGER, Kern::Printf( a, b, c, d, e )) sl@0: #else sl@0: sl@0: #include sl@0: sl@0: #define LOG_MSG( a ) RDebug::Printf( a ) sl@0: #define LOG_MSG2( a, b ) RDebug::Printf( a, b ) sl@0: #define LOG_MSG3( a, b, c ) RDebug::Printf( a, b, c ) sl@0: #define LOG_MSG4( a, b, c, d ) RDebug::Printf( a, b, c, d ) sl@0: #define LOG_MSG5( a, b, c, d, e ) RDebug::Printf( a, b, c, d, e ) sl@0: sl@0: #endif sl@0: sl@0: #else sl@0: sl@0: #define LOG_MSG( a ) sl@0: #define LOG_MSG2( a, b ) sl@0: #define LOG_MSG3( a, b, c ) sl@0: #define LOG_MSG4( a, b, c, d ) sl@0: #define LOG_MSG5( a, b, c, d, e ) sl@0: sl@0: #endif sl@0: sl@0: #endif //RM_DEBUG_LOGGING_H sl@0: