diff --git a/API/Log4Net.config.xml b/API/Log4Net.config.xml new file mode 100644 index 0000000..c19ffd7 --- /dev/null +++ b/API/Log4Net.config.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/API/Program.cs b/API/Program.cs index 5004004..b631606 100644 --- a/API/Program.cs +++ b/API/Program.cs @@ -135,7 +135,7 @@ using (IServiceScope scope = app.Services.CreateScope()) } Tranga.SetServiceProvider(app.Services); -Tranga.StartLogger(); +Tranga.StartLogger(new FileInfo("Log4Net.config.xml")); Tranga.AddDefaultWorkers(); app.UseCors("AllowAll"); diff --git a/API/Tranga.cs b/API/Tranga.cs index 9869582..a5cf3d8 100644 --- a/API/Tranga.cs +++ b/API/Tranga.cs @@ -41,9 +41,9 @@ public static class Tranga internal static readonly RemoveOldNotificationsWorker RemoveOldNotificationsWorker = new(); internal static readonly UpdateCoversWorker UpdateCoversWorker = new(); - internal static void StartLogger() + internal static void StartLogger(FileInfo loggerConfigFile) { - BasicConfigurator.Configure(); + XmlConfigurator.ConfigureAndWatch(loggerConfigFile); Log.Info("Logger Configured."); Log.Info(TRANGA); }