[*] Fix no flush after blocking write on logger dtor
This commit is contained in:
parent
ef04d2bac3
commit
01254d088b
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user