diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2016-10-24 20:42:54 +0200 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2016-10-24 20:42:54 +0200 |
commit | b66f212cdce336a024244a7278b557e0daffe39e (patch) | |
tree | e38bb484580d6688fdad42426c6c4ee15677aba4 /src/Log.cpp | |
parent | 223d70be498dc240a92bb8961bfd5d99cebbcf1d (diff) | |
download | dabmod-b66f212cdce336a024244a7278b557e0daffe39e.tar.gz dabmod-b66f212cdce336a024244a7278b557e0daffe39e.tar.bz2 dabmod-b66f212cdce336a024244a7278b557e0daffe39e.zip |
Ensure log_message_t contents are always initialised
Diffstat (limited to 'src/Log.cpp')
-rw-r--r-- | src/Log.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/Log.cpp b/src/Log.cpp index 77687fc..4780f58 100644 --- a/src/Log.cpp +++ b/src/Log.cpp @@ -68,10 +68,7 @@ void Logger::log(log_level_t level, const char* fmt, ...) void Logger::logstr(log_level_t level, std::string message) { - log_message_t m; - m.level = level; - m.message = message; - + log_message_t m(level, message); m_message_queue.push(std::move(m)); } @@ -86,7 +83,7 @@ void Logger::io_process() auto message = m.message; - if (m.level == debug and m.message.empty()) { + if (m.level == trace and m.message.empty()) { // Special message to stop thread break; } |