Commit a01f3424 authored by jehan's avatar jehan Committed by jehan

align slogd behavior to logd

parent 94e0d172
......@@ -279,6 +279,10 @@ public:
pumpstream(const char *domain, BctbxLogLevel level) : mDomain(domain ? domain : ""), mLevel(level) {}
~pumpstream() {
const char *domain = mDomain.empty() ? NULL : mDomain.c_str();
#ifndef BCTBX_DEBUG_MODE
if (mLevel == BCTBX_LOG_DEBUG)
return; //silently discard debug to be inlined with bctbx_debug
#endif
if (bctbx_log_level_enabled(domain, mLevel))
bctbx_log(domain, mLevel, "%s", str().c_str());
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment