From 4fe5e5974eb0baab66762c4c8c44ef9b6132d8e1 Mon Sep 17 00:00:00 2001 From: Bogdan Date: Wed, 31 May 2023 06:46:19 +0300 Subject: [PATCH] Fixed: Don't log handled exceptions in API --- src/NzbDrone.Common/Instrumentation/NzbDroneLogger.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/NzbDrone.Common/Instrumentation/NzbDroneLogger.cs b/src/NzbDrone.Common/Instrumentation/NzbDroneLogger.cs index 15f0ebbfe..76517a6de 100644 --- a/src/NzbDrone.Common/Instrumentation/NzbDroneLogger.cs +++ b/src/NzbDrone.Common/Instrumentation/NzbDroneLogger.cs @@ -108,9 +108,10 @@ namespace NzbDrone.Common.Instrumentation { LogManager.Setup().LoadConfiguration(c => { + c.ForLogger("System.*").WriteToNil(LogLevel.Warn); + c.ForLogger("Microsoft.*").WriteToNil(LogLevel.Warn); c.ForLogger("Microsoft.Hosting.Lifetime*").WriteToNil(LogLevel.Info); - c.ForLogger("System*").WriteToNil(LogLevel.Warn); - c.ForLogger("Microsoft*").WriteToNil(LogLevel.Warn); + c.ForLogger("Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware").WriteToNil(LogLevel.Fatal); }); }