feat(maui): implement unified Serilog logging infrastructure and Blazor/JS interop bridge

This commit is contained in:
2026-05-21 20:25:32 +02:00
parent 0a3ca77d46
commit f902073bcb
10 changed files with 738 additions and 5 deletions
+18
View File
@@ -8,4 +8,22 @@ public partial class App : Microsoft.Maui.Controls.Application
MainPage = new MainPage();
}
protected override Window CreateWindow(IActivationState? activationState)
{
var window = base.CreateWindow(activationState);
// Hook into native MAUI lifecycle events to cleanly flush and close Serilog buffers
window.Stopped += (s, e) =>
{
Serilog.Log.CloseAndFlush();
};
window.Destroying += (s, e) =>
{
Serilog.Log.CloseAndFlush();
};
return window;
}
}