feat(maui): implement unified Serilog logging infrastructure and Blazor/JS interop bridge
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user