summaryrefslogtreecommitdiff
path: root/src/debug/Log.hpp
diff options
context:
space:
mode:
authorVaxry <vaxry@vaxry.net>2023-12-06 14:46:18 +0000
committerVaxry <vaxry@vaxry.net>2023-12-06 14:46:29 +0000
commit03c6f4506ab06d2920c59b3c64f45cb4eec8c97a (patch)
tree72aff88f74f89729f17e902e01eb488cb1eb1f0c /src/debug/Log.hpp
parent13b4c6de869b782ae18a0e8ac7c590e8000cc1c2 (diff)
internal: various improvements to avoid crashes on exit
Diffstat (limited to 'src/debug/Log.hpp')
-rw-r--r--src/debug/Log.hpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/debug/Log.hpp b/src/debug/Log.hpp
index 659e2db4..d9a7f6aa 100644
--- a/src/debug/Log.hpp
+++ b/src/debug/Log.hpp
@@ -27,6 +27,7 @@ namespace Debug {
inline int64_t* disableTime = nullptr;
inline bool disableStdout = false;
inline bool trace = false;
+ inline bool shuttingDown = false;
inline std::string rollingLog = ""; // rolling log contains the ROLLING_LOG_SIZE tail of the log
@@ -36,6 +37,9 @@ namespace Debug {
if (level == TRACE && !trace)
return;
+ if (shuttingDown)
+ return;
+
std::string logMsg = "";
switch (level) {