From bb7e2fc70c8c966f52e1c225c58dc2fea89c8c89 Mon Sep 17 00:00:00 2001 From: Bogdan Date: Wed, 31 May 2023 06:51:46 +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 c4de52e5b..3f8997625 100644 --- a/src/NzbDrone.Common/Instrumentation/NzbDroneLogger.cs +++ b/src/NzbDrone.Common/Instrumentation/NzbDroneLogger.cs @@ -107,9 +107,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); }); }