Skip to content
Snippets Groups Projects
Commit 9456f23f authored by Maxence Naud's avatar Maxence Naud Committed by Maxence Naud
Browse files

fix NDEBUG precompilation condition in log

parent 8fd73a76
No related branches found
No related tags found
2 merge requests!318[Upd] release verision 0.5.0,!313[UPD] add some logging informations
......@@ -108,15 +108,15 @@ public:
* @param args Format string and arguments for the message
* @note Debug messages are only compiled in debug builds
*/
#ifdef NDEBUG
#ifndef NDEBUG
template <typename... Args>
static void debug(Args&&... /*args*/) {
// Debug logging disabled in release builds
static void debug(Args&&... args) {
log(Debug, fmt::format(std::forward<Args>(args)...));
}
#else
template <typename... Args>
static void debug(Args&&... args) {
log(Debug, fmt::format(std::forward<Args>(args)...));
static void debug(Args&&... /*args*/) {
// Debug logging disabled in release builds
}
#endif
......
......@@ -26,7 +26,7 @@ namespace Aidge {
* Log::Level::Notice.
*/
Log::Level Log::mConsoleLevel = []() {
#ifdef NDEBUG
#ifndef NDEBUG
constexpr Level defaultLevel = Level::Debug;
#else
constexpr Log::Level defaultLevel = Level::Notice;
......@@ -57,7 +57,7 @@ bool Log::mConsoleColor = []() {
* then the default level is Log::Level::Debug, else it is Log::Level::Notice.
*/
Log::Level Log::mFileLevel = []() {
#ifdef NDEBUG
#ifndef NDEBUG
constexpr Level defaultLevel = Level::Debug;
#else
constexpr Log::Level defaultLevel = Level::Notice;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment