From 539bd174fcf0c285d626c66ded1a3748e147a354 Mon Sep 17 00:00:00 2001 From: Bogdan Date: Wed, 31 May 2023 06:50:40 +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 107dcd877..e2f8dc0eb 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); }); }