From 5a5d0852eeab976ef7d08acc70ad5a35462c13c5 Mon Sep 17 00:00:00 2001 From: "kay.one" Date: Tue, 21 Jun 2011 23:34:33 -0700 Subject: [PATCH] Updated some log levels --- NzbDrone.Core.Test/MediaFileProviderTests.cs | 4 +--- NzbDrone.Core/Providers/DiskScanProvider.cs | 10 +++++----- NzbDrone.Core/Providers/Jobs/JobProvider.cs | 10 +++++----- NzbDrone.Core/Providers/MediaFileProvider.cs | 10 +++++----- NzbDrone/IISController.cs | 2 +- 5 files changed, 17 insertions(+), 19 deletions(-) diff --git a/NzbDrone.Core.Test/MediaFileProviderTests.cs b/NzbDrone.Core.Test/MediaFileProviderTests.cs index 01b424ee4..17e3e4a7f 100644 --- a/NzbDrone.Core.Test/MediaFileProviderTests.cs +++ b/NzbDrone.Core.Test/MediaFileProviderTests.cs @@ -106,8 +106,7 @@ namespace NzbDrone.Core.Test result.Should().HaveSameCount(episodes); result.Should().OnlyContain(e => e.EpisodeFileId == 0); removedLinks.Should().Be(10); - ExceptionVerification.ExcpectedWarns(1); - } + } [Test] public void DeleteOrphanedEpisodeFiles() @@ -129,7 +128,6 @@ namespace NzbDrone.Core.Test //Assert result.Should().HaveCount(5); result.Should().OnlyContain(e => e.EpisodeFileId > 0); - ExceptionVerification.ExcpectedWarns(1); } [Test] diff --git a/NzbDrone.Core/Providers/DiskScanProvider.cs b/NzbDrone.Core/Providers/DiskScanProvider.cs index 7392b65be..626b546af 100644 --- a/NzbDrone.Core/Providers/DiskScanProvider.cs +++ b/NzbDrone.Core/Providers/DiskScanProvider.cs @@ -110,13 +110,13 @@ namespace NzbDrone.Core.Providers if (episodes.Count <= 0) { - Logger.Debug("Can't find any matching episodes in the database. skipping"); + Logger.Debug("Can't find any matching episodes in the database. skipping. {0}", filePath); return null; } if (episodes.Any(e => e.EpisodeFile != null && e.EpisodeFile.QualityWrapper > parseResult.Quality)) { - Logger.Info("File with better quality is already attached. skipping {0}", filePath); + Logger.Trace("File with better quality is already attached. skipping {0}", filePath); return null; } @@ -135,7 +135,7 @@ namespace NzbDrone.Core.Providers { ep.EpisodeFileId = fileId; _episodeProvider.UpdateEpisode(ep); - Logger.Trace("Linking file {0} to {1}", filePath, ep); + Logger.Debug("Linking file {0} to {1}", filePath, ep); } @@ -156,7 +156,7 @@ namespace NzbDrone.Core.Providers _diskProvider.CreateDirectory(newFile.DirectoryName); //Do the rename - Logger.Trace("Attempting to rename {0} to {1}", episodeFile.Path, newFile.FullName); + Logger.Debug("Moving file [{0}] > [1]", episodeFile.Path, newFile.FullName); _diskProvider.MoveFile(episodeFile.Path, newFile.FullName); //Update the filename in the DB @@ -200,7 +200,7 @@ namespace NzbDrone.Core.Providers var mediaFileList = filesOnDisk.Where(c => MediaExtentions.Contains(Path.GetExtension(c).ToLower())).ToList(); - Logger.Debug("{0} media files were found in {1}", mediaFileList.Count, path); + Logger.Trace("{0} video files were found in {1}", mediaFileList.Count, path); return mediaFileList; } } diff --git a/NzbDrone.Core/Providers/Jobs/JobProvider.cs b/NzbDrone.Core/Providers/Jobs/JobProvider.cs index ab640155d..da6c054e4 100644 --- a/NzbDrone.Core/Providers/Jobs/JobProvider.cs +++ b/NzbDrone.Core/Providers/Jobs/JobProvider.cs @@ -53,12 +53,12 @@ namespace NzbDrone.Core.Providers.Jobs { if (settings.Id == 0) { - Logger.Debug("Adding job settings for {0}", settings.Name); + Logger.Trace("Adding job settings for {0}", settings.Name); _database.Insert(settings); } else { - Logger.Debug("Updating job settings for {0}", settings.Name); + Logger.Trace("Updating job settings for {0}", settings.Name); _database.Update(settings); } } @@ -98,7 +98,7 @@ namespace NzbDrone.Core.Providers.Jobs _isRunning = false; } - Logger.Debug("Finished executing scheduled tasks."); + Logger.Trace("Finished executing scheduled tasks."); return true; } @@ -124,7 +124,7 @@ namespace NzbDrone.Core.Providers.Jobs } Queue.Add(queueTuple); - Logger.Debug("Job ({0}:{1}) added to the queue", jobType, targetId); + Logger.Trace("Job ({0}:{1}) added to the queue", jobType, targetId); } @@ -213,7 +213,7 @@ namespace NzbDrone.Core.Providers.Jobs } else { - Logger.Debug("Finished processing jobs in the queue."); + Logger.Trace("Finished processing jobs in the queue."); } return; diff --git a/NzbDrone.Core/Providers/MediaFileProvider.cs b/NzbDrone.Core/Providers/MediaFileProvider.cs index 81dc4c9ff..2429cd71b 100644 --- a/NzbDrone.Core/Providers/MediaFileProvider.cs +++ b/NzbDrone.Core/Providers/MediaFileProvider.cs @@ -97,7 +97,7 @@ namespace NzbDrone.Core.Providers public virtual int RepairLinks() { - Logger.Debug("Verifying Episode>Episode file relationships."); + Logger.Trace("Verifying Episode>Episode file relationships."); var updated = _database.Execute(@"UPDATE Episodes SET EpisodeFileId = 0 WHERE EpisodeFileId IN (SELECT Episodes.EpisodeFileId FROM Episodes @@ -107,7 +107,7 @@ namespace NzbDrone.Core.Providers if (updated > 0) { - Logger.Warn("Removed {0} invalid links to episode files.", updated); + Logger.Debug("Removed {0} invalid links to episode files.", updated); } return updated; @@ -115,7 +115,7 @@ namespace NzbDrone.Core.Providers public virtual int DeleteOrphaned() { - Logger.Debug("Deleting orphaned files."); + Logger.Trace("Deleting orphaned files."); var updated = _database.Execute(@"DELETE FROM EpisodeFiles WHERE EpisodeFileId IN @@ -126,7 +126,7 @@ namespace NzbDrone.Core.Providers if (updated > 0) { - Logger.Warn("Removed {0} orphaned files.", updated); + Logger.Debug("Removed {0} orphaned files.", updated); } return updated; @@ -186,7 +186,7 @@ namespace NzbDrone.Core.Providers if (_configProvider.ReplaceSpaces) result = result.Replace(' ', '.'); - Logger.Debug("New File Name is: {0}", result.Trim()); + Logger.Trace("New File Name is: {0}", result.Trim()); return CleanFilename(result.Trim()); } diff --git a/NzbDrone/IISController.cs b/NzbDrone/IISController.cs index 7721d5262..06d4bc99e 100644 --- a/NzbDrone/IISController.cs +++ b/NzbDrone/IISController.cs @@ -72,7 +72,7 @@ namespace NzbDrone IISProcess.BeginOutputReadLine(); //Start Ping - _pingTimer = new Timer(30000) { AutoReset = true }; + _pingTimer = new Timer(300000) { AutoReset = true }; _pingTimer.Elapsed += (PingServer); _pingTimer.Start();