1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-04-23 13:17:45 +00:00

Debug messages do show now

This commit is contained in:
Mordred 2018-10-27 00:11:29 +02:00
parent 1df4adebec
commit a31be89c29

View file

@ -36,9 +36,10 @@ void Logger::init()
auto logger = std::make_shared< spdlog::async_logger >( "logger", sinks.begin(), sinks.end(), spdlog::thread_pool(), spdlog::async_overflow_policy::block ); 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::register_logger( logger );
spdlog::set_pattern( "[%H:%M:%S.%e] [%^%l%$] %v" ); 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 // always flush the log on criticial messages, otherwise it's done by libc
// see: https://github.com/gabime/spdlog/wiki/7.-Flush-policy // 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 // nb: if the server crashes, log data can be missing from the file unless something logs critical just before it does