aboutsummaryrefslogtreecommitdiffstats
path: root/src/Log.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Log.cpp')
-rw-r--r--src/Log.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Log.cpp b/src/Log.cpp
index ee16880..81f7955 100644
--- a/src/Log.cpp
+++ b/src/Log.cpp
@@ -82,15 +82,15 @@ void Logger::io_process()
set_thread_name("logger");
while (1) {
log_message_t m;
- m_message_queue.wait_and_pop(m);
-
- auto message = m.message;
-
- if (m.level == trace and m.message.empty()) {
- // Special message to stop thread
+ try {
+ m_message_queue.wait_and_pop(m);
+ }
+ catch (const ThreadsafeQueueWakeup&) {
break;
}
+ auto message = m.message;
+
/* Remove a potential trailing newline.
* It doesn't look good in syslog
*/