about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/debug.cpp2
-rw-r--r--src/debug.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/debug.cpp b/src/debug.cpp
index 82d2be0..d133344 100644
--- a/src/debug.cpp
+++ b/src/debug.cpp
@@ -22,7 +22,7 @@ static bool debug_mode     = false;
 static bool debug_check    = true;  // check data/algorithms
 static bool debug_strict   = false; // fail on error
 static bool debug_quiet    = false;
-static uint debug_issue    = 0;     // github issues
+static uint debug_issue    = 0;     // track github issues
 static bool debug_legacy   = false; // legacy mode
 
 void debug_set_debug_mode(bool setting) { debug_mode = setting; }
diff --git a/src/debug.h b/src/debug.h
index b3ec17b..29f6c69 100644
--- a/src/debug.h
+++ b/src/debug.h
@@ -77,7 +77,7 @@ inline void fail_msg(std::string msg) {
 #else // DEBUG
 
 #define warning_msg(msg) cerr << "**** WARNING: " << msg << " in " << __FILE__ << " at line " << __LINE__ << " in " << __FUNCTION__ << endl;
-#define debug_msg(msg) cerr << "**** DEBUG: " << msg << " in " << __FILE__ << " at line " << __LINE__ << " in " << __FUNCTION__ << endl;
+#define debug_msg(msg) (is_debug_mode() && cerr << "**** DEBUG: " << msg << " in " << __FILE__ << " at line " << __LINE__ << " in " << __FUNCTION__ << endl);
 #define assert_issue(is_issue, expr) \
   ((is_issue) ? enforce_msg(expr,"FAIL: ISSUE assert") : __ASSERT_VOID_CAST(0))