aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDLL
diff options
context:
space:
mode:
authorEmma Miler <emma.pi@protonmail.com>2022-11-16 00:24:38 +0100
committerGitHub <noreply@github.com>2022-11-16 00:24:38 +0100
commit06b088d9a188510a2334ed52a0a3d24129f095bb (patch)
tree571e48aff5d994ad8b7b9b69d249fb65fc86bd14 /NorthstarDLL
parent5cd63250b697f0b49ff1bb787672cf06bbce27a6 (diff)
downloadNorthstarLauncher-06b088d9a188510a2334ed52a0a3d24129f095bb.tar.gz
NorthstarLauncher-06b088d9a188510a2334ed52a0a3d24129f095bb.zip
Fix logging (#333)
I forgot to update this piece of code to make it so that the file sink gets pushed to all loggers instead of only the `[NORTHSTAR]` one
Diffstat (limited to 'NorthstarDLL')
-rw-r--r--NorthstarDLL/logging.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/NorthstarDLL/logging.cpp b/NorthstarDLL/logging.cpp
index 233c360e..2184bd3f 100644
--- a/NorthstarDLL/logging.cpp
+++ b/NorthstarDLL/logging.cpp
@@ -50,7 +50,10 @@ void CreateLogFiles()
stream << std::put_time(&currentTime, (GetNorthstarPrefix() + "/logs/nslog%Y-%m-%d %H-%M-%S.txt").c_str());
auto sink = std::make_shared<spdlog::sinks::basic_file_sink_mt>(stream.str(), false);
sink->set_pattern("[%H:%M:%S] [%n] [%l] %v");
- spdlog::default_logger()->sinks().push_back(sink);
+ for (auto& logger : loggers)
+ {
+ logger->sinks().push_back(sink);
+ }
spdlog::flush_on(spdlog::level::info);
}
catch (...)