From 568a0080372fae05a89768dde141144d442e2501 Mon Sep 17 00:00:00 2001 From: Nick Bolton Date: Thu, 2 Aug 2018 14:11:05 +0100 Subject: [PATCH] #6382 Add helpful comment about DCMAKE_BUILD_TYPE and logging --- src/lib/base/Log.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/lib/base/Log.cpp b/src/lib/base/Log.cpp index 5ddd6b856..d6eb336b6 100644 --- a/src/lib/base/Log.cpp +++ b/src/lib/base/Log.cpp @@ -46,7 +46,12 @@ static const char* g_priority[] = { // number of priorities static const int g_numPriority = (int)(sizeof(g_priority) / sizeof(g_priority[0])); -// the default priority +// if NDEBUG (not debug) is not specified, i.e. you're building in debug, +// then set default log level to DEBUG, otherwise the max level is INFO. +// +// GOTCHA: if `-DCMAKE_BUILD_TYPE=Debug` isn't set when configuring cmake +// for visual studio, then NDEBUG will be set (even if your VS solution +// config is Debug). #ifndef NDEBUG static const int g_defaultMaxPriority = kDEBUG; #else