mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 02:37:08 -07:00
updated logging/loggly
This commit is contained in:
parent
2f204e3d29
commit
7417f76086
4 changed files with 9 additions and 17 deletions
|
@ -2,6 +2,7 @@
|
|||
using System.Linq;
|
||||
using NLog;
|
||||
using NLog.Config;
|
||||
using NLog.Targets;
|
||||
using NzbDrone.Common.Messaging;
|
||||
using NzbDrone.Core.Configuration;
|
||||
using NzbDrone.Core.Configuration.Events;
|
||||
|
@ -28,10 +29,12 @@ namespace NzbDrone.Core.Instrumentation
|
|||
var minimumLogLevel = LogLevel.FromString(_configFileProvider.LogLevel);
|
||||
|
||||
var rules = LogManager.Configuration.LoggingRules;
|
||||
var rollingFileLogger = rules.Single(s => s.Targets.Any(t => t.Name == "rollingFileLogger"));
|
||||
var rollingFileLogger = rules.Single(s => s.Targets.Any(t => t is FileTarget));
|
||||
rollingFileLogger.EnableLoggingForLevel(LogLevel.Trace);
|
||||
|
||||
SetMinimumLogLevel(rollingFileLogger, minimumLogLevel);
|
||||
|
||||
LogManager.ReconfigExistingLoggers();
|
||||
}
|
||||
|
||||
private void SetMinimumLogLevel(LoggingRule rule, LogLevel minimumLogLevel)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue