mirror of
https://git.ryujinx.app/kenji-nx/ryujinx.git
synced 2025-12-19 04:37:09 +00:00
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:
parent
66a5719e10
commit
f5822c16af
5 changed files with 59 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue