diff --git a/Kyoo.WindowsHost/SystemTrait.cs b/Kyoo.WindowsHost/SystemTrait.cs
index 22009ab1..b0b7bbbf 100644
--- a/Kyoo.WindowsHost/SystemTrait.cs
+++ b/Kyoo.WindowsHost/SystemTrait.cs
@@ -78,6 +78,7 @@ namespace Kyoo.Host.Windows
{
_options = options;
+ AppDomain.CurrentDomain.ProcessExit += (_, _) => Dispose();
Application.ApplicationExit += (_, _) => Dispose();
_icon = new NotifyIcon();
@@ -111,8 +112,8 @@ namespace Kyoo.Host.Windows
///
protected override void Dispose(bool disposing)
{
- base.Dispose(disposing);
_icon.Visible = false;
+ base.Dispose(disposing);
_icon.Dispose();
}
diff --git a/Kyoo/CoreModule.cs b/Kyoo/CoreModule.cs
index 2d1e35e8..470ad3bd 100644
--- a/Kyoo/CoreModule.cs
+++ b/Kyoo/CoreModule.cs
@@ -17,6 +17,7 @@ using Microsoft.AspNetCore.StaticFiles;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
+using Serilog;
using IMetadataProvider = Kyoo.Abstractions.Controllers.IMetadataProvider;
namespace Kyoo
@@ -151,6 +152,7 @@ namespace Kyoo
app.UseHsts();
}
}, SA.Before),
+ SA.New(app => app.UseSerilogRequestLogging(), SA.Before),
SA.New(app => app.UseResponseCompression(), SA.Routing + 1),
SA.New(app => app.UseRouting(), SA.Routing),
SA.New(app => app.UseEndpoints(x => x.MapControllers()), SA.Endpoint)
diff --git a/Kyoo/Kyoo.csproj b/Kyoo/Kyoo.csproj
index d4a573f9..c7c358cc 100644
--- a/Kyoo/Kyoo.csproj
+++ b/Kyoo/Kyoo.csproj
@@ -24,6 +24,11 @@
+
+
+
+
+
@@ -44,8 +49,7 @@
-
+
diff --git a/Kyoo/PluginsStartup.cs b/Kyoo/PluginsStartup.cs
index 4bcd362f..c5545842 100644
--- a/Kyoo/PluginsStartup.cs
+++ b/Kyoo/PluginsStartup.cs
@@ -131,19 +131,13 @@ namespace Kyoo
/// This is meant to be used from .
///
/// The context of the web host.
- ///
- /// The method used to configure the logger factory used by the plugin manager and plugins during startup.
+ ///
+ /// The logger factory used to log while the application is setting itself up.
///
/// A new .
public static PluginsStartup FromWebHost(WebHostBuilderContext host,
- Action loggingConfiguration)
+ ILoggerFactory logger)
{
- HostBuilderContext genericHost = new(new Dictionary