From a31be89c2927b747cb04de04e16f036ca890f72c Mon Sep 17 00:00:00 2001 From: Mordred Date: Sat, 27 Oct 2018 00:11:29 +0200 Subject: [PATCH] Debug messages do show now --- src/common/Logging/Logger.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/common/Logging/Logger.cpp b/src/common/Logging/Logger.cpp index cd57b69a..231b33a9 100644 --- a/src/common/Logging/Logger.cpp +++ b/src/common/Logging/Logger.cpp @@ -35,10 +35,11 @@ void Logger::init() std::vector sinks { stdout_sink, daily_sink }; auto logger = std::make_shared< spdlog::async_logger >( "logger", sinks.begin(), sinks.end(), spdlog::thread_pool(), spdlog::async_overflow_policy::block ); - + + spdlog::register_logger( logger ); spdlog::set_pattern( "[%H:%M:%S.%e] [%^%l%$] %v" ); - + spdlog::set_level( spdlog::level::debug ); // always flush the log on criticial messages, otherwise it's done by libc // see: https://github.com/gabime/spdlog/wiki/7.-Flush-policy // nb: if the server crashes, log data can be missing from the file unless something logs critical just before it does