summaryrefslogtreecommitdiff
path: root/src/debug.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/debug.cpp')
-rw-r--r--src/debug.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/debug.cpp b/src/debug.cpp
index 43e2795e..8a0d1f3c 100644
--- a/src/debug.cpp
+++ b/src/debug.cpp
@@ -11,7 +11,7 @@ TraceLog::TraceLog(const char* tag, ::std::function<void(::std::ostream&)> info_
m_tag(tag),
m_ret(ret)
{
- if(debug_enabled()) {
+ if(debug_enabled() && m_tag) {
auto& os = debug_output(g_debug_indent_level, m_tag);
os << ">> (";
info_cb(os);
@@ -23,7 +23,7 @@ TraceLog::TraceLog(const char* tag, ::std::function<void(::std::ostream&)> info_
m_tag(tag),
m_ret([](const auto&){})
{
- if(debug_enabled()) {
+ if(debug_enabled() && m_tag) {
auto& os = debug_output(g_debug_indent_level, m_tag);
os << ">> (";
info_cb(os);
@@ -35,7 +35,7 @@ TraceLog::TraceLog(const char* tag):
m_tag(tag),
m_ret([](const auto&){})
{
- if(debug_enabled()) {
+ if(debug_enabled() && m_tag) {
auto& os = debug_output(g_debug_indent_level, m_tag);
os << ">>" << ::std::endl;
}
@@ -43,7 +43,7 @@ TraceLog::TraceLog(const char* tag):
}
TraceLog::~TraceLog() {
UNINDENT();
- if(debug_enabled()) {
+ if(debug_enabled() && m_tag) {
auto& os = debug_output(g_debug_indent_level, m_tag);
os << "<< (";
m_ret(os);