diff options
Diffstat (limited to 'src/Printer.cc')
-rw-r--r-- | src/Printer.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/Printer.cc b/src/Printer.cc index 026ee1a..ee6029c 100644 --- a/src/Printer.cc +++ b/src/Printer.cc @@ -40,7 +40,7 @@ void Balau::Printer::_log(uint32_t level, const char * fmt, va_list ap) { if (l & level) break; - m_lock.enter(); + ScopeLock sl(m_lock); if (m_detailledLogs) { struct ev_loop * loop = ev_default_loop(0); ev_now_update(loop); @@ -50,7 +50,6 @@ void Balau::Printer::_log(uint32_t level, const char * fmt, va_list ap) { _print(prefixes[i]); _print(fmt, ap); _print("\n"); - m_lock.leave(); } void Balau::Printer::_print(const char * fmt, va_list ap) { |