Disable nancyfx diagnostics unless in debug

This commit is contained in:
Mark McDowall 2014-02-07 18:21:44 -08:00
parent be9b7284b5
commit e131817022
1 changed files with 6 additions and 0 deletions

View File

@ -3,6 +3,7 @@ using Nancy.Bootstrapper;
using Nancy.Diagnostics;
using NzbDrone.Api.ErrorManagement;
using NzbDrone.Api.Extensions.Pipelines;
using NzbDrone.Common.EnvironmentInfo;
using NzbDrone.Common.Instrumentation;
using NzbDrone.Core.Instrumentation;
using NzbDrone.Core.Lifecycle;
@ -26,6 +27,11 @@ namespace NzbDrone.Api
{
_logger.Info("Starting NzbDrone API");
if (RuntimeInfo.IsProduction)
{
DiagnosticsHook.Disable(pipelines);
}
RegisterPipelines(pipelines);
container.Resolve<DatabaseTarget>().Register();