diff options
| author | Stefan Boberg <[email protected]> | 2021-09-15 21:30:56 +0200 |
|---|---|---|
| committer | Stefan Boberg <[email protected]> | 2021-09-15 21:30:56 +0200 |
| commit | 681721f66359e90ee0e5d8967f6195230e361e5d (patch) | |
| tree | 9f57b3531da6e8227086e80541f655873f7c7323 | |
| parent | Fixed logging.h so it doesn't leak `using namespace std::literals` declaration (diff) | |
| download | zen-681721f66359e90ee0e5d8967f6195230e361e5d.tar.xz zen-681721f66359e90ee0e5d8967f6195230e361e5d.zip | |
Added explicit logging initialization to main() of standalone executables, to make things work with the new default logger shadowing changes
| -rw-r--r-- | zen/zen.cpp | 2 | ||||
| -rw-r--r-- | zencore-test/zencore-test.cpp | 4 | ||||
| -rw-r--r-- | zenserver-test/zenserver-test.cpp | 2 |
3 files changed, 7 insertions, 1 deletions
diff --git a/zen/zen.cpp b/zen/zen.cpp index 4b8d3adc1..d8bfa13e5 100644 --- a/zen/zen.cpp +++ b/zen/zen.cpp @@ -96,6 +96,8 @@ main(int argc, char** argv) { mi_version(); + zen::logging::InitializeLogging(); + #if TEST_UWS /* Overly simple hello world app, using multiple threads */ std::vector<std::thread*> threads(4); diff --git a/zencore-test/zencore-test.cpp b/zencore-test/zencore-test.cpp index 8c53cf349..1782f1926 100644 --- a/zencore-test/zencore-test.cpp +++ b/zencore-test/zencore-test.cpp @@ -1,8 +1,8 @@ // zencore-test.cpp : Defines the entry point for the console application. // -#include <zencore/sha1.h> #include <zencore/zencore.h> +#include <zencore/logging.h> #define DOCTEST_CONFIG_IMPLEMENT #include <doctest/doctest.h> @@ -17,5 +17,7 @@ forceLinkTests() int main(int argc, char* argv[]) { + zen::logging::InitializeLogging(); + return doctest::Context(argc, argv).run(); } diff --git a/zenserver-test/zenserver-test.cpp b/zenserver-test/zenserver-test.cpp index df17cc353..1ae3f39fa 100644 --- a/zenserver-test/zenserver-test.cpp +++ b/zenserver-test/zenserver-test.cpp @@ -659,6 +659,8 @@ main(int argc, char** argv) zencore_forcelinktests(); + zen::logging::InitializeLogging(); + spdlog::set_level(spdlog::level::debug); spdlog::set_formatter(std::make_unique<logging::full_formatter>("test", std::chrono::system_clock::now())); |