diff options
Diffstat (limited to '')
-rw-r--r-- | src/common/logging/backend.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/common/logging/backend.cpp b/src/common/logging/backend.cpp index 4e7cfdc99..6f1d251e1 100644 --- a/src/common/logging/backend.cpp +++ b/src/common/logging/backend.cpp @@ -5,6 +5,7 @@ #include <atomic> #include <chrono> #include <climits> +#include <exception> #include <thread> #include <vector> @@ -160,7 +161,7 @@ public: void EnableForStacktrace() override {} }; -bool initialization_in_progress_suppress_logging = false; +bool initialization_in_progress_suppress_logging = true; #ifdef YUZU_LINUX_GCC_BACKTRACE [[noreturn]] void SleepForever() { @@ -177,17 +178,17 @@ class Impl { public: static Impl& Instance() { if (!instance) { - abort(); + throw std::runtime_error("Using Logging instance before its initialization"); } return *instance; } static void Initialize() { if (instance) { - abort(); + LOG_WARNING(Log, "Reinitializing logging backend"); + return; } using namespace Common::FS; - initialization_in_progress_suppress_logging = true; const auto& log_dir = GetYuzuPath(YuzuPath::LogDir); void(CreateDir(log_dir)); Filter filter; |