mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-21 14:03:29 -07:00
wiredup db logging.
This commit is contained in:
parent
1016edb05b
commit
af4063c3e2
6 changed files with 31 additions and 6 deletions
|
@ -3,7 +3,6 @@ using NLog.Config;
|
|||
using NLog;
|
||||
using NLog.Layouts;
|
||||
using NLog.Targets;
|
||||
using NzbDrone.Common;
|
||||
|
||||
namespace NzbDrone.Core.Instrumentation
|
||||
{
|
||||
|
@ -21,12 +20,17 @@ namespace NzbDrone.Core.Instrumentation
|
|||
{
|
||||
Layout = new SimpleLayout("${callsite:className=false:fileName=false:includeSourcePath=false:methodName=true}");
|
||||
|
||||
Rule = new LoggingRule("*", LogLevel.Debug, this);
|
||||
|
||||
LogManager.Configuration.AddTarget("DbLogger", this);
|
||||
LogManager.Configuration.LoggingRules.Add(new LoggingRule("*", LogLevel.Info, this));
|
||||
LogManager.Configuration.LoggingRules.Add(Rule);
|
||||
LogManager.ConfigurationReloaded += (sender, args) => Register();
|
||||
LogManager.ReconfigExistingLoggers();
|
||||
}
|
||||
|
||||
|
||||
public LoggingRule Rule { get; set; }
|
||||
|
||||
protected override void Write(LogEventInfo logEvent)
|
||||
{
|
||||
var log = new Log();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue