diff --git a/wxdata/source/scwx/util/logger.cpp b/wxdata/source/scwx/util/logger.cpp index 8a97d80e..407ce354 100644 --- a/wxdata/source/scwx/util/logger.cpp +++ b/wxdata/source/scwx/util/logger.cpp @@ -20,6 +20,12 @@ static std::vector> extraSinks_ {}; void Initialize() { spdlog::set_pattern(logPattern_); + + // Periodically flush every 3 seconds + spdlog::flush_every(std::chrono::seconds(3)); + + // Flush whenever logging info or higher + spdlog::flush_on(spdlog::level::level_enum::info); } void AddFileSink(const std::string& baseFilename)