mirror of
https://github.com/Radarr/Radarr.git
synced 2026-04-19 21:46:50 -04:00
wiredup db logging.
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user