diff options
author | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2023-02-06 00:25:06 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-06 01:25:06 +0100 |
commit | 31a05c35e60b844cf806b146a4889f79272ed749 (patch) | |
tree | a82c6120efea90455ab9a2143e7602cee2c6d476 /NorthstarDLL/logging/logging.cpp | |
parent | f7b7de8a584b877b9bf05fe63a0b0f91c7a5e944 (diff) | |
download | NorthstarLauncher-31a05c35e60b844cf806b146a4889f79272ed749.tar.gz NorthstarLauncher-31a05c35e60b844cf806b146a4889f79272ed749.zip |
Flush loggers properly on dedicated server shutdown (#413)v1.12.2-rc1v1.12.2v1.12.1-rc1v1.12.1
flush loggers properly on dedicated server shutdown
Diffstat (limited to 'NorthstarDLL/logging/logging.cpp')
-rw-r--r-- | NorthstarDLL/logging/logging.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/NorthstarDLL/logging/logging.cpp b/NorthstarDLL/logging/logging.cpp index 6bb57170..8b906911 100644 --- a/NorthstarDLL/logging/logging.cpp +++ b/NorthstarDLL/logging/logging.cpp @@ -203,3 +203,11 @@ void InitialiseLogging() loggers.push_back(NS::log::rpak); loggers.push_back(NS::log::echo); } + +void NS::log::FlushLoggers() +{ + for (auto& logger : loggers) + logger->flush(); + + spdlog::default_logger()->flush(); +} |