summaryrefslogtreecommitdiffstats
path: root/src/Log.h
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2016-10-24 20:42:54 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2016-10-24 20:42:54 +0200
commitb66f212cdce336a024244a7278b557e0daffe39e (patch)
treee38bb484580d6688fdad42426c6c4ee15677aba4 /src/Log.h
parent223d70be498dc240a92bb8961bfd5d99cebbcf1d (diff)
downloaddabmod-b66f212cdce336a024244a7278b557e0daffe39e.tar.gz
dabmod-b66f212cdce336a024244a7278b557e0daffe39e.tar.bz2
dabmod-b66f212cdce336a024244a7278b557e0daffe39e.zip
Ensure log_message_t contents are always initialised
Diffstat (limited to 'src/Log.h')
-rw-r--r--src/Log.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Log.h b/src/Log.h
index 0714835..3a588f4 100644
--- a/src/Log.h
+++ b/src/Log.h
@@ -138,7 +138,9 @@ struct log_message_t {
level(_level),
message(_message) {}
- log_message_t() {}
+ log_message_t() :
+ level(debug),
+ message("") {}
log_level_t level;
std::string message;
@@ -154,7 +156,7 @@ class Logger {
const Logger& operator=(const Logger& other) = delete;
~Logger() {
// Special message to stop the thread
- log_message_t m(debug, "");
+ log_message_t m(trace, "");
m_message_queue.push(m);
m_io_thread.join();