Remove NDEBUG check

This commit is contained in:
Alexey Rybalchenko 2020-07-10 13:56:17 +02:00
parent 35ebc10204
commit ce64f628b0
3 changed files with 3 additions and 8 deletions

View File

@ -219,8 +219,7 @@ message(STATUS " ")
if(DEFINED FAIR_MIN_SEVERITY)
message(STATUS " ${Cyan}FAIR_MIN_SEVERITY${CR} ${BGreen}${FAIR_MIN_SEVERITY}${CR} (change with ${BMagenta}-DFAIR_MIN_SEVERITY=...${CR})")
else()
message(STATUS " ${Cyan}FAIR_MIN_SEVERITY${CR} not defined${CR}, enabling all severities (starting with info if NDEBUG is defined)${CR}")
message(STATUS " (change with ${BMagenta}-DFAIR_MIN_SEVERITY=...${CR})")
message(STATUS " ${Cyan}FAIR_MIN_SEVERITY${CR} not defined${CR}, enabling all severities (change with ${BMagenta}-DFAIR_MIN_SEVERITY=...${CR})")
endif()
message(STATUS " ")
message(STATUS " ${Cyan}INSTALL PREFIX${CR} ${BGreen}${CMAKE_INSTALL_PREFIX}${CR} (change with ${BMagenta}-DCMAKE_INSTALL_PREFIX=...${CR})")

View File

@ -111,7 +111,7 @@ The minimum severity level can be configured at compile time via definition of `
#include <fairlogger/Logger.h>
```
When `FAIR_MIN_SEVERITY` is not provided, it will be set to `info` if `NDEBUG` is defined, otherwise all severities will be enabled.
When `FAIR_MIN_SEVERITY` is not provided all severities are enabled.
## 4. Verbosity

View File

@ -13,10 +13,6 @@
#warning "The symbol 'DEBUG' is used in FairRoot Logger. undefining..."
#endif
#if !defined(FAIR_MIN_SEVERITY) && defined(NDEBUG)
#define FAIR_MIN_SEVERITY info
#endif
#ifdef FAIRLOGGER_USE_BOOST_PRETTY_FUNCTION
#include <boost/current_function.hpp>
#endif
@ -324,7 +320,7 @@ class Logger
static bool fIsDestructed;
static struct DestructionHelper { ~DestructionHelper() { Logger::fIsDestructed = true; }} fDestructionHelper;
static bool constexpr SuppressSeverity(Severity sev)
static bool constexpr SuppressSeverity(Severity sev __attribute__((unused)))
{
#ifdef FAIR_MIN_SEVERITY
return sev < Severity::FAIR_MIN_SEVERITY;