Lots of initialization, configuration clean up.

This commit is contained in:
kay.one 2011-11-13 16:22:18 -08:00
commit 51518787d8
74 changed files with 316 additions and 279 deletions

View file

@ -1,4 +1,5 @@
using System;
using NLog.Config;
using Ninject;
using NLog;
using NLog.Targets;
@ -19,6 +20,15 @@ namespace NzbDrone.Core.Instrumentation
_database = database;
}
public void Register()
{
LogManager.Configuration.AddTarget("DbLogger", this);
LogManager.Configuration.LoggingRules.Add(new LoggingRule("*", LogLevel.Debug, this));
LogManager.ConfigurationReloaded += (sender, args) => Register();
LogConfiguration.Reload();
}
protected override void Write(LogEventInfo logEvent)