From 6e8955b064687362b08066f6b8b945909afa39d0 Mon Sep 17 00:00:00 2001 From: Konstantin LEONTEV Date: Sat, 8 Oct 2022 18:56:12 +0300 Subject: [PATCH] dynamic_log_messages: Log macros changed to dynamic mode. --- src/SALOMELocalTrace/utilities.h | 39 +++++++++++--------------------- 1 file changed, 13 insertions(+), 26 deletions(-) diff --git a/src/SALOMELocalTrace/utilities.h b/src/SALOMELocalTrace/utilities.h index fc6b2bf16..52945c85d 100644 --- a/src/SALOMELocalTrace/utilities.h +++ b/src/SALOMELocalTrace/utilities.h @@ -37,6 +37,7 @@ #include "LocalTraceBufferPool.hxx" +#include "libSALOMELog.hxx" /*! * For each message to put in the trace, a specific ostingstream object is @@ -101,40 +102,26 @@ #error INFOS_COMPILATION already defined #endif -#if defined(_DEBUG_) || defined(_DEBUG) +// --- the following MACROS can be enabled in debug and release versions +// --- by SALOME_VERBOSE environment variable -// --- the following MACROS are useful at debug time - -#define INFOS_COMPILATION { MESS_BEGIN("COMPILED with ") << COMPILER \ +#define INFOS_COMPILATION if (SALOME::VerbosityActivated()) { MESS_BEGIN("COMPILED with ") << COMPILER \ << ", " << __DATE__ \ - << " at " << __TIME__ << MESS_END } + << " at " << __TIME__ << MESS_END } else (void)0 + -#define MESSAGE(msg) {MESS_BEGIN("- Trace ") << msg << MESS_END} -#define SCRUTE(var) {MESS_BEGIN("- Trace ") << #var << "=" << var <