diff --git a/NzbDrone.Core/CentralDispatch.cs b/NzbDrone.Core/CentralDispatch.cs index e036b51e1..daee295a2 100644 --- a/NzbDrone.Core/CentralDispatch.cs +++ b/NzbDrone.Core/CentralDispatch.cs @@ -108,6 +108,8 @@ public static void BindKernel() InSingletonScope(); _kernel.Bind().ToConstant(logRepository).WhenInjectedInto().InSingletonScope(); + LogConfiguration.Setup(); + ForceMigration(_kernel.Get()); SetupDefaultQualityProfiles(_kernel.Get()); //Setup the default QualityProfiles on start-up @@ -154,6 +156,7 @@ private static void ForceMigration(IRepository repository) repository.All().Count(); repository.All().Count(); repository.All().Count(); + repository.All().Count(); } /// diff --git a/NzbDrone.Core/Instrumentation/LogConfiguration.cs b/NzbDrone.Core/Instrumentation/LogConfiguration.cs index b678e8966..e57ddc52d 100644 --- a/NzbDrone.Core/Instrumentation/LogConfiguration.cs +++ b/NzbDrone.Core/Instrumentation/LogConfiguration.cs @@ -28,8 +28,6 @@ private static void BindCustomLoggers() LogManager.Configuration.AddTarget("Exceptioneer", exTarget); LogManager.Configuration.LoggingRules.Add(new LoggingRule("*", NLog.LogLevel.Error, exTarget)); #endif - - var sonicTarget = CentralDispatch.NinjectKernel.Get(); LogManager.Configuration.AddTarget("DbLogger", sonicTarget); LogManager.Configuration.LoggingRules.Add(new LoggingRule("*", NLog.LogLevel.Info, sonicTarget)); diff --git a/NzbDrone.Web/Global.asax.cs b/NzbDrone.Web/Global.asax.cs index 57401501b..c1a5fa03d 100644 --- a/NzbDrone.Web/Global.asax.cs +++ b/NzbDrone.Web/Global.asax.cs @@ -36,7 +36,6 @@ protected override void OnApplicationStarted() { base.OnApplicationStarted(); - LogConfiguration.Setup(); Logger.Info("NZBDrone Starting up."); CentralDispatch.DedicateToHost(); diff --git a/NzbDrone.Web/Web.config b/NzbDrone.Web/Web.config index 2460a88df..2870b5ce1 100644 --- a/NzbDrone.Web/Web.config +++ b/NzbDrone.Web/Web.config @@ -70,7 +70,7 @@ - + diff --git a/NzbDrone.sln b/NzbDrone.sln index 0cfcfbde7..16b90b117 100644 --- a/NzbDrone.sln +++ b/NzbDrone.sln @@ -27,6 +27,7 @@ Global GlobalSection(ProjectConfigurationPlatforms) = postSolution {D12F7F2F-8A3C-415F-88FA-6DD061A84869}.Debug|Any CPU.ActiveCfg = Debug|x86 {D12F7F2F-8A3C-415F-88FA-6DD061A84869}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 + {D12F7F2F-8A3C-415F-88FA-6DD061A84869}.Debug|Mixed Platforms.Build.0 = Debug|x86 {D12F7F2F-8A3C-415F-88FA-6DD061A84869}.Debug|x64.ActiveCfg = Debug|x86 {D12F7F2F-8A3C-415F-88FA-6DD061A84869}.Debug|x86.ActiveCfg = Debug|x86 {D12F7F2F-8A3C-415F-88FA-6DD061A84869}.Debug|x86.Build.0 = Debug|x86