mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 13:33:34 -07:00
Fixed: Don't log handled exceptions in API
(cherry picked from commit 59f2e5b65dd7352aad92b33adefa6cf5ca79a0de) Closes #3736
This commit is contained in:
parent
8036247d37
commit
47f9467266
1 changed files with 6 additions and 0 deletions
|
@ -13,6 +13,7 @@ using Microsoft.Extensions.Configuration;
|
|||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using Microsoft.Extensions.Hosting.WindowsServices;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using NLog;
|
||||
using NzbDrone.Common.Composition.Extensions;
|
||||
using NzbDrone.Common.Disk;
|
||||
|
@ -23,6 +24,7 @@ using NzbDrone.Common.Instrumentation;
|
|||
using NzbDrone.Common.Instrumentation.Extensions;
|
||||
using NzbDrone.Core.Configuration;
|
||||
using NzbDrone.Core.Datastore.Extensions;
|
||||
using LogLevel = Microsoft.Extensions.Logging.LogLevel;
|
||||
using PostgresOptions = NzbDrone.Core.Datastore.PostgresOptions;
|
||||
|
||||
namespace NzbDrone.Host
|
||||
|
@ -144,6 +146,10 @@ namespace NzbDrone.Host
|
|||
return new HostBuilder()
|
||||
.UseContentRoot(Directory.GetCurrentDirectory())
|
||||
.UseServiceProviderFactory(new DryIocServiceProviderFactory(new Container(rules => rules.WithNzbDroneRules())))
|
||||
.ConfigureLogging(logging =>
|
||||
{
|
||||
logging.AddFilter("Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware", LogLevel.None);
|
||||
})
|
||||
.ConfigureContainer<IContainer>(c =>
|
||||
{
|
||||
c.AutoAddServices(Bootstrap.ASSEMBLIES)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue