PNS debug output is enabled with PNS_DEBUG define.

This commit is contained in:
Maciej Suminski 2014-05-14 16:40:56 +02:00
parent b59770e8ca
commit 84e4b8f04f
1 changed files with 9 additions and 4 deletions

View File

@ -32,10 +32,15 @@ static inline void _trace_print( const char* aFuncName, int level, const std::st
#endif
}
#define TRACE( level, fmt, ... ) \
_trace_print( __FUNCTION__, level, ( boost::format( fmt ) % __VA_ARGS__ ).str() );
#ifdef PNS_DEBUG
#define TRACE( level, fmt, ... ) \
_trace_print( __FUNCTION__, level, ( boost::format( fmt ) % __VA_ARGS__ ).str() );
#define TRACEn( level, msg ) \
_trace_print( __FUNCTION__, level, std::string( msg ) );
#define TRACEn( level, msg ) \
_trace_print( __FUNCTION__, level, std::string( msg ) );
#else
#define TRACE( ... )
#define TRACEn( ... )
#endif
#endif