From 222ed1eb4be3b895c111127f523d77c5189be298 Mon Sep 17 00:00:00 2001 From: Taloth Saldono Date: Tue, 16 Aug 2016 22:10:03 +0200 Subject: [PATCH] Changed startup loglevel to avoid incorrect sonarr.debug/trace log entry. --- .../Instrumentation/NzbDroneLogger.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/NzbDrone.Common/Instrumentation/NzbDroneLogger.cs b/src/NzbDrone.Common/Instrumentation/NzbDroneLogger.cs index 223291122..7c672f725 100644 --- a/src/NzbDrone.Common/Instrumentation/NzbDroneLogger.cs +++ b/src/NzbDrone.Common/Instrumentation/NzbDroneLogger.cs @@ -103,12 +103,12 @@ private static void RegisterConsole() private static void RegisterAppFile(IAppFolderInfo appFolderInfo) { - RegisterAppFile(appFolderInfo, "appFileInfo", "sonarr.txt", 5); - RegisterAppFile(appFolderInfo, "appFileDebug", "sonarr.debug.txt", 50); - RegisterAppFile(appFolderInfo, "appFileTrace", "sonarr.trace.txt", 50); + RegisterAppFile(appFolderInfo, "appFileInfo", "sonarr.txt", 5, LogLevel.Info); + RegisterAppFile(appFolderInfo, "appFileDebug", "sonarr.debug.txt", 50, LogLevel.Off); + RegisterAppFile(appFolderInfo, "appFileTrace", "sonarr.trace.txt", 50, LogLevel.Off); } - private static LoggingRule RegisterAppFile(IAppFolderInfo appFolderInfo, string name, string fileName, int maxArchiveFiles) + private static LoggingRule RegisterAppFile(IAppFolderInfo appFolderInfo, string name, string fileName, int maxArchiveFiles, LogLevel minLogLevel) { var fileTarget = new NzbDroneFileTarget(); @@ -125,7 +125,7 @@ private static LoggingRule RegisterAppFile(IAppFolderInfo appFolderInfo, string fileTarget.ArchiveNumbering = ArchiveNumberingMode.Rolling; fileTarget.Layout = FILE_LOG_LAYOUT; - var loggingRule = new LoggingRule("*", LogLevel.Trace, fileTarget); + var loggingRule = new LoggingRule("*", minLogLevel, fileTarget); LogManager.Configuration.AddTarget(name, fileTarget); LogManager.Configuration.LoggingRules.Add(loggingRule); @@ -173,4 +173,4 @@ public static Logger GetLogger(object obj) } } -} \ No newline at end of file +}