mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-12-16 11:37:58 +02:00
Don't try to set console logging when its not enabled
This commit is contained in:
parent
1837ba94cc
commit
e58576bcfa
@ -28,11 +28,14 @@ public void Reconfigure()
|
|||||||
var rules = LogManager.Configuration.LoggingRules;
|
var rules = LogManager.Configuration.LoggingRules;
|
||||||
|
|
||||||
//Console
|
//Console
|
||||||
var consoleLoggerRule = rules.Single(s => s.Targets.Any(t => t is ColoredConsoleTarget));
|
var consoleLoggerRule = rules.SingleOrDefault(s => s.Targets.Any(t => t is ColoredConsoleTarget));
|
||||||
consoleLoggerRule.EnableLoggingForLevel(LogLevel.Trace);
|
|
||||||
|
|
||||||
SetMinimumLogLevel(consoleLoggerRule, minimumLogLevel);
|
|
||||||
|
|
||||||
|
if (consoleLoggerRule != null)
|
||||||
|
{
|
||||||
|
consoleLoggerRule.EnableLoggingForLevel(LogLevel.Trace);
|
||||||
|
SetMinimumLogLevel(consoleLoggerRule, minimumLogLevel);
|
||||||
|
}
|
||||||
|
|
||||||
//Log Files
|
//Log Files
|
||||||
var rollingFileLoggerRule = rules.Single(s => s.Targets.Any(t => t is NzbDroneFileTarget));
|
var rollingFileLoggerRule = rules.Single(s => s.Targets.Any(t => t is NzbDroneFileTarget));
|
||||||
rollingFileLoggerRule.EnableLoggingForLevel(LogLevel.Trace);
|
rollingFileLoggerRule.EnableLoggingForLevel(LogLevel.Trace);
|
||||||
|
Loading…
Reference in New Issue
Block a user