From 84e4b8f04fbb5c56bc0e44318f9f26d8938a9b4f Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 14 May 2014 16:40:56 +0200 Subject: [PATCH] PNS debug output is enabled with PNS_DEBUG define. --- pcbnew/router/trace.h | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/pcbnew/router/trace.h b/pcbnew/router/trace.h index 91f29baa15..7e6fc80980 100644 --- a/pcbnew/router/trace.h +++ b/pcbnew/router/trace.h @@ -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