diff --git a/Source/Logging/Logger.cpp b/Source/Logging/Logger.cpp index 3f40ae54..ab8df44c 100644 --- a/Source/Logging/Logger.cpp +++ b/Source/Logging/Logger.cpp @@ -216,10 +216,8 @@ namespace Aurora::Logging } } - void ForceFlushFlush() + void ForceFlushFlushNoLock() { - AU_LOCK_GUARD(gGlobalSpin); - for (const auto &logger : gFlushableLoggers) { for (const auto &sink : logger->sinks) @@ -241,12 +239,19 @@ namespace Aurora::Logging } } + void ForceFlushFlush() + { + AU_LOCK_GUARD(gGlobalSpin); + + ForceFlushFlushNoLock(); + } void Logger::Disable() { AU_LOCK_GUARD(gGlobalSpin); ForceFlushLoggersNoLock(); + ForceFlushFlushNoLock(); { AU_LOCK_GUARD(spin);