mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 10:47:08 -07:00
Lots of initialization, configuration clean up.
This commit is contained in:
parent
62013f6f87
commit
51518787d8
74 changed files with 316 additions and 279 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue