epoc32/include/tools/coredump/debuglogging.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
     1 // Copyright (c) 2007-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 the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 // Logging macros for use in debug subsystem
    15 //
    16 
    17 
    18 
    19 /**
    20  @file
    21  @internalTechnology
    22  @released
    23 */
    24 
    25 #ifndef DEBUG_LOGGING_H
    26 #define DEBUG_LOGGING_H
    27 
    28 /* 
    29  * Debug messages are only generated for debug builds.
    30  */
    31 
    32 #ifdef CDSDEBUG
    33 
    34     #include <e32debug.h>
    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();} }
    36 
    37     #define LOG_MSG( a )              RDebug::Printf( a )
    38     #define LOG_MSG2( a, b )          RDebug::Printf( a, b )
    39     #define LOG_MSG3( a, b, c )       RDebug::Printf( a, b, c )
    40     #define LOG_MSG4( a, b, c, d )    RDebug::Printf( a, b, c, d )
    41     #define LOG_MSG5( a, b, c, d, e ) RDebug::Printf( a, b, c, d, e )
    42 
    43 #else
    44 
    45     #define LOG_DES(des)
    46     #define LOG_MSG( a )
    47     #define LOG_MSG2( a, b )
    48     #define LOG_MSG3( a, b, c )
    49     #define LOG_MSG4( a, b, c, d )
    50     #define LOG_MSG5( a, b, c, d, e )
    51 
    52 #endif
    53 
    54 #endif //DEBUG_LOGGING_H