securitydialogs/secuidialognotifier/inc/secuidialogstrace.h
changeset 63 989397f9511c
parent 59 881d92421467
equal deleted inserted replaced
62:3255e7d5bd67 63:989397f9511c
    18 #ifndef SECUIDIALOGSTRACE_H
    18 #ifndef SECUIDIALOGSTRACE_H
    19 #define SECUIDIALOGSTRACE_H
    19 #define SECUIDIALOGSTRACE_H
    20 
    20 
    21 #include <e32debug.h>                   // RDebug
    21 #include <e32debug.h>                   // RDebug
    22 
    22 
    23 
       
    24 // TODO: replace with OST tracing
       
    25 #ifdef _DEBUG
    23 #ifdef _DEBUG
    26 #define TRACE( a, ARGS... ) { RDebug::Printf( "%s %s (%u) value=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0 );     DebugPrint( _L( a ), ##ARGS ) ; };
    24 		#define RDEBUG( x, y ) RDebug::Printf( "%s %s (%u) %s=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, x, y );
    27 #else
    25 #else
    28 #define TRACE( a, ARGS... )
    26     #define RDEBUG( x, y )
    29 #endif
    27 #endif
    30 
       
    31 
       
    32 // ---------------------------------------------------------------------------
       
    33 // DebugPrint()
       
    34 // ---------------------------------------------------------------------------
       
    35 //
       
    36 #ifdef _DEBUG
       
    37 const TInt KMaxPrintSize = 256;
       
    38 inline void DebugPrint( TRefByValue<const TDesC> aFmt, ... )
       
    39     {
       
    40     VA_LIST list;
       
    41     VA_START( list, aFmt );
       
    42     TBuf<KMaxPrintSize> buf;
       
    43     buf.AppendFormatList( aFmt, list );
       
    44     RDebug::Print( buf );
       
    45     }
       
    46 #endif
       
    47 
       
    48 
    28 
    49 #endif  // SECUIDIALOGSTRACE_H
    29 #endif  // SECUIDIALOGSTRACE_H
    50 
    30