|
|
@@ -172,9 +172,10 @@ private:
|
|
|
/// Macros for tracing the control flow of the application conveniently. If the LOG_TRACE macro is used it should be
|
|
|
/// the first statement in the function. Logging traces via this macro have almost no impact when the trace is disabled.
|
|
|
///
|
|
|
-#define RAII_TRACE(logger, onEntry, onLeave) \
|
|
|
- if(logger->isTraceEnabled()) \
|
|
|
- std::unique_ptr<vstd::CTraceLogger> ctl00 = std::make_unique<vstd::CTraceLogger>(logger, onEntry, onLeave)
|
|
|
+#define RAII_TRACE(logger, onEntry, onLeave) \
|
|
|
+ std::unique_ptr<vstd::CTraceLogger> ctl00 = logger->isTraceEnabled() ? \
|
|
|
+ std::make_unique<vstd::CTraceLogger>(logger, onEntry, onLeave) : \
|
|
|
+ std::unique_ptr<vstd::CTraceLogger>()
|
|
|
|
|
|
#define LOG_TRACE(logger) RAII_TRACE(logger, \
|
|
|
boost::str(boost::format("Entering %s.") % BOOST_CURRENT_FUNCTION), \
|