Flush the error log before exit

Currently, some logs can be missing when a fatal error occurs (especially GuestBrokeExecutionException).

This MR attempts to flush logs to console and file before process exit.
This commit is contained in:
Coxxs 2025-10-13 17:40:15 -05:00 committed by KeatonTheBot
parent 66a5719e10
commit f5822c16af
5 changed files with 59 additions and 1 deletions

View file

@ -187,6 +187,17 @@ namespace Ryujinx.Common.Logging
}
}
public static void Flush()
{
foreach (ILogTarget target in _logTargets)
{
if (target is AsyncLogTargetWrapper asyncTarget)
{
asyncTarget.Flush();
}
}
}
public static void Shutdown()
{
Updated = null;