Revert "Fixed: Don't log handled exceptions in API"

This reverts commit 47f9467266.
This commit is contained in:
Bogdan 2023-05-31 06:49:59 +03:00
parent 937a8518ad
commit 346f1b097d
1 changed files with 0 additions and 6 deletions

View File

@ -13,7 +13,6 @@ using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Hosting.WindowsServices; using Microsoft.Extensions.Hosting.WindowsServices;
using Microsoft.Extensions.Logging;
using NLog; using NLog;
using NzbDrone.Common.Composition.Extensions; using NzbDrone.Common.Composition.Extensions;
using NzbDrone.Common.Disk; using NzbDrone.Common.Disk;
@ -24,7 +23,6 @@ using NzbDrone.Common.Instrumentation;
using NzbDrone.Common.Instrumentation.Extensions; using NzbDrone.Common.Instrumentation.Extensions;
using NzbDrone.Core.Configuration; using NzbDrone.Core.Configuration;
using NzbDrone.Core.Datastore.Extensions; using NzbDrone.Core.Datastore.Extensions;
using LogLevel = Microsoft.Extensions.Logging.LogLevel;
using PostgresOptions = NzbDrone.Core.Datastore.PostgresOptions; using PostgresOptions = NzbDrone.Core.Datastore.PostgresOptions;
namespace NzbDrone.Host namespace NzbDrone.Host
@ -146,10 +144,6 @@ namespace NzbDrone.Host
return new HostBuilder() return new HostBuilder()
.UseContentRoot(Directory.GetCurrentDirectory()) .UseContentRoot(Directory.GetCurrentDirectory())
.UseServiceProviderFactory(new DryIocServiceProviderFactory(new Container(rules => rules.WithNzbDroneRules()))) .UseServiceProviderFactory(new DryIocServiceProviderFactory(new Container(rules => rules.WithNzbDroneRules())))
.ConfigureLogging(logging =>
{
logging.AddFilter("Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware", LogLevel.None);
})
.ConfigureContainer<IContainer>(c => .ConfigureContainer<IContainer>(c =>
{ {
c.AutoAddServices(Bootstrap.ASSEMBLIES) c.AutoAddServices(Bootstrap.ASSEMBLIES)