Major logging overhaul

This commit is contained in:
Mark McDowall 2014-03-13 13:12:42 -07:00
parent 953024cd40
commit 2f3430387e
102 changed files with 284 additions and 238 deletions

View File

@ -25,7 +25,7 @@ namespace NzbDrone.Common
public void Extract(string compressedFile, string destination) public void Extract(string compressedFile, string destination)
{ {
_logger.Trace("Extracting archive [{0}] to [{1}]", compressedFile, destination); _logger.Debug("Extracting archive [{0}] to [{1}]", compressedFile, destination);
if (OsInfo.IsWindows) if (OsInfo.IsWindows)
{ {
@ -37,7 +37,7 @@ namespace NzbDrone.Common
ExtractTgz(compressedFile, destination); ExtractTgz(compressedFile, destination);
} }
_logger.Trace("Extraction complete."); _logger.Debug("Extraction complete.");
} }
private void ExtractZip(string compressedFile, string destination) private void ExtractZip(string compressedFile, string destination)

View File

@ -201,7 +201,7 @@ namespace NzbDrone.Common.Disk
Ensure.That(source, () => source).IsValidPath(); Ensure.That(source, () => source).IsValidPath();
Ensure.That(target, () => target).IsValidPath(); Ensure.That(target, () => target).IsValidPath();
Logger.Trace("{0} {1} -> {2}", transferAction, source, target); Logger.Debug("{0} {1} -> {2}", transferAction, source, target);
var sourceFolder = new DirectoryInfo(source); var sourceFolder = new DirectoryInfo(source);
var targetFolder = new DirectoryInfo(target); var targetFolder = new DirectoryInfo(target);
@ -220,7 +220,7 @@ namespace NzbDrone.Common.Disk
{ {
var destFile = Path.Combine(target, sourceFile.Name); var destFile = Path.Combine(target, sourceFile.Name);
Logger.Trace("{0} {1} -> {2}", transferAction, sourceFile, destFile); Logger.Debug("{0} {1} -> {2}", transferAction, sourceFile, destFile);
switch (transferAction) switch (transferAction)
{ {

View File

@ -102,14 +102,14 @@ namespace NzbDrone.Common
fileInfo.Directory.Create(); fileInfo.Directory.Create();
} }
_logger.Trace("Downloading [{0}] to [{1}]", url, fileName); _logger.Debug("Downloading [{0}] to [{1}]", url, fileName);
var stopWatch = Stopwatch.StartNew(); var stopWatch = Stopwatch.StartNew();
var webClient = new WebClient(); var webClient = new WebClient();
webClient.Headers.Add(HttpRequestHeader.UserAgent, _userAgent); webClient.Headers.Add(HttpRequestHeader.UserAgent, _userAgent);
webClient.DownloadFile(url, fileName); webClient.DownloadFile(url, fileName);
stopWatch.Stop(); stopWatch.Stop();
_logger.Trace("Downloading Completed. took {0:0}s", stopWatch.Elapsed.Seconds); _logger.Debug("Downloading Completed. took {0:0}s", stopWatch.Elapsed.Seconds);
} }
catch (WebException e) catch (WebException e)
{ {
@ -127,7 +127,7 @@ namespace NzbDrone.Common
{ {
address = String.Format("http://{0}/jsonrpc", address); address = String.Format("http://{0}/jsonrpc", address);
_logger.Trace("Posting command: {0}, to {1}", command, address); _logger.Debug("Posting command: {0}, to {1}", command, address);
byte[] byteArray = Encoding.ASCII.GetBytes(command); byte[] byteArray = Encoding.ASCII.GetBytes(command);

View File

@ -48,7 +48,7 @@ namespace NzbDrone.Common.Instrumentation
{ {
if (logEvent == null || logEvent.Exception == null) return; if (logEvent == null || logEvent.Exception == null) return;
InternalLogger.Trace("Sending Exception to api.exceptron.com. Process Name: {0}", Process.GetCurrentProcess().ProcessName); InternalLogger.Debug("Sending Exception to api.exceptron.com. Process Name: {0}", Process.GetCurrentProcess().ProcessName);
try try
{ {

View File

@ -60,7 +60,7 @@ namespace NzbDrone.Common.Processes
public ProcessInfo GetProcessById(int id) public ProcessInfo GetProcessById(int id)
{ {
Logger.Trace("Finding process with Id:{0}", id); Logger.Debug("Finding process with Id:{0}", id);
var processInfo = ConvertToProcessInfo(Process.GetProcesses().FirstOrDefault(p => p.Id == id)); var processInfo = ConvertToProcessInfo(Process.GetProcesses().FirstOrDefault(p => p.Id == id));
@ -70,7 +70,7 @@ namespace NzbDrone.Common.Processes
} }
else else
{ {
Logger.Trace("Found process {0}", processInfo.ToString()); Logger.Debug("Found process {0}", processInfo.ToString());
} }
return processInfo; return processInfo;
@ -186,7 +186,7 @@ namespace NzbDrone.Common.Processes
public void WaitForExit(Process process) public void WaitForExit(Process process)
{ {
Logger.Trace("Waiting for process {0} to exit.", process.ProcessName); Logger.Debug("Waiting for process {0} to exit.", process.ProcessName);
process.WaitForExit(); process.WaitForExit();
} }
@ -268,7 +268,7 @@ namespace NzbDrone.Common.Processes
if (process.HasExited) if (process.HasExited)
{ {
Logger.Trace("Process has already exited"); Logger.Debug("Process has already exited");
return; return;
} }

View File

@ -4,7 +4,6 @@ using FluentAssertions;
using NLog; using NLog;
using NUnit.Framework; using NUnit.Framework;
using NzbDrone.Common.Instrumentation; using NzbDrone.Common.Instrumentation;
using NzbDrone.Core.Datastore;
using NzbDrone.Core.Datastore.Migration.Framework; using NzbDrone.Core.Datastore.Migration.Framework;
using NzbDrone.Core.MediaFiles; using NzbDrone.Core.MediaFiles;
using NzbDrone.Core.Instrumentation; using NzbDrone.Core.Instrumentation;
@ -103,7 +102,7 @@ namespace NzbDrone.Core.Test.InstrumentationTests
public void null_string_as_arg_should_not_fail() public void null_string_as_arg_should_not_fail()
{ {
var epFile = new EpisodeFile(); var epFile = new EpisodeFile();
_logger.Trace("File {0} no longer exists on disk. removing from database.", epFile.Path); _logger.Debug("File {0} no longer exists on disk. removing from database.", epFile.Path);
epFile.Path.Should().BeNull(); epFile.Path.Should().BeNull();
} }

View File

@ -247,7 +247,7 @@ namespace NzbDrone.Core.Configuration
{ {
key = key.ToLowerInvariant(); key = key.ToLowerInvariant();
_logger.Trace("Writing Setting to file. Key:'{0}' Value:'{1}'", key, value); _logger.Trace("Writing Setting to database. Key:'{0}' Value:'{1}'", key, value);
var dbValue = _repository.Get(key); var dbValue = _repository.Get(key);

View File

@ -38,7 +38,7 @@ namespace NzbDrone.Core.DataAugmentation.Xem
public List<int> GetXemSeriesIds() public List<int> GetXemSeriesIds()
{ {
_logger.Trace("Fetching Series IDs from"); _logger.Debug("Fetching Series IDs from");
var restClient = new RestClient(XEM_BASE_URL); var restClient = new RestClient(XEM_BASE_URL);
@ -52,9 +52,7 @@ namespace NzbDrone.Core.DataAugmentation.Xem
public List<XemSceneTvdbMapping> GetSceneTvdbMappings(int id) public List<XemSceneTvdbMapping> GetSceneTvdbMappings(int id)
{ {
_logger.Trace("Fetching Mappings for: {0}", id); _logger.Debug("Fetching Mappings for: {0}", id);
var url = String.Format("{0}all?id={1}&origin=tvdb", XEM_BASE_URL, id);
var restClient = new RestClient(XEM_BASE_URL); var restClient = new RestClient(XEM_BASE_URL);

View File

@ -30,7 +30,7 @@ namespace NzbDrone.Core.DataAugmentation.Xem
private void PerformUpdate(Series series) private void PerformUpdate(Series series)
{ {
_logger.Trace("Updating scene numbering mapping for: {0}", series); _logger.Debug("Updating scene numbering mapping for: {0}", series);
try try
{ {
@ -38,7 +38,7 @@ namespace NzbDrone.Core.DataAugmentation.Xem
if (!mappings.Any()) if (!mappings.Any())
{ {
_logger.Trace("Mappings for: {0} are empty, skipping", series); _logger.Debug("Mappings for: {0} are empty, skipping", series);
_cache.Remove(series.TvdbId.ToString()); _cache.Remove(series.TvdbId.ToString());
return; return;
} }
@ -54,13 +54,13 @@ namespace NzbDrone.Core.DataAugmentation.Xem
foreach (var mapping in mappings) foreach (var mapping in mappings)
{ {
_logger.Trace("Setting scene numbering mappings for {0} S{1:00}E{2:00}", series, mapping.Tvdb.Season, mapping.Tvdb.Episode); _logger.Debug("Setting scene numbering mappings for {0} S{1:00}E{2:00}", series, mapping.Tvdb.Season, mapping.Tvdb.Episode);
var episode = episodes.SingleOrDefault(e => e.SeasonNumber == mapping.Tvdb.Season && e.EpisodeNumber == mapping.Tvdb.Episode); var episode = episodes.SingleOrDefault(e => e.SeasonNumber == mapping.Tvdb.Season && e.EpisodeNumber == mapping.Tvdb.Episode);
if (episode == null) if (episode == null)
{ {
_logger.Trace("Information hasn't been added to TheTVDB yet, skipping."); _logger.Debug("Information hasn't been added to TheTVDB yet, skipping.");
continue; continue;
} }
@ -105,7 +105,7 @@ namespace NzbDrone.Core.DataAugmentation.Xem
if (!_cache.Find(message.Series.TvdbId.ToString())) if (!_cache.Find(message.Series.TvdbId.ToString()))
{ {
_logger.Trace("Scene numbering is not available for {0} [{1}]", message.Series.Title, message.Series.TvdbId); _logger.Debug("Scene numbering is not available for {0} [{1}]", message.Series.Title, message.Series.TvdbId);
return; return;
} }

View File

@ -32,7 +32,7 @@ namespace NzbDrone.Core.Datastore.Migration.Framework
public void Sql(string sql) public void Sql(string sql)
{ {
_logger.Trace(sql); _logger.Debug(sql);
} }
public void ElapsedTime(TimeSpan timeSpan) public void ElapsedTime(TimeSpan timeSpan)

View File

@ -4,7 +4,7 @@ using System.Linq;
using NLog; using NLog;
using NzbDrone.Core.DecisionEngine.Specifications; using NzbDrone.Core.DecisionEngine.Specifications;
using NzbDrone.Core.IndexerSearch.Definitions; using NzbDrone.Core.IndexerSearch.Definitions;
using NzbDrone.Core.Instrumentation; using NzbDrone.Core.Instrumentation.Extensions;
using NzbDrone.Core.Parser; using NzbDrone.Core.Parser;
using NzbDrone.Core.Parser.Model; using NzbDrone.Core.Parser.Model;
using NzbDrone.Common.Serializer; using NzbDrone.Common.Serializer;

View File

@ -26,7 +26,7 @@ namespace NzbDrone.Core.DecisionEngine
int compare = new QualityModelComparer(profile).Compare(newQuality, currentQuality); int compare = new QualityModelComparer(profile).Compare(newQuality, currentQuality);
if (compare <= 0) if (compare <= 0)
{ {
_logger.Trace("existing item has better or equal quality. skipping"); _logger.Debug("existing item has better or equal quality. skipping");
return false; return false;
} }
@ -50,7 +50,7 @@ namespace NzbDrone.Core.DecisionEngine
return true; return true;
} }
_logger.Trace("Existing item meets cut-off. skipping."); _logger.Debug("Existing item meets cut-off. skipping.");
return false; return false;
} }
@ -63,7 +63,7 @@ namespace NzbDrone.Core.DecisionEngine
if (currentQuality.Quality == newQuality.Quality && compare > 0) if (currentQuality.Quality == newQuality.Quality && compare > 0)
{ {
_logger.Trace("New quality is a proper for existing quality"); _logger.Debug("New quality is a proper for existing quality");
return true; return true;
} }

View File

@ -27,19 +27,19 @@ namespace NzbDrone.Core.DecisionEngine.Specifications
public virtual bool IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteria) public virtual bool IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteria)
{ {
_logger.Trace("Beginning size check for: {0}", subject); _logger.Debug("Beginning size check for: {0}", subject);
var quality = subject.ParsedEpisodeInfo.Quality.Quality; var quality = subject.ParsedEpisodeInfo.Quality.Quality;
if (quality == Quality.RAWHD) if (quality == Quality.RAWHD)
{ {
_logger.Trace("Raw-HD release found, skipping size check."); _logger.Debug("Raw-HD release found, skipping size check.");
return true; return true;
} }
if (quality == Quality.Unknown) if (quality == Quality.Unknown)
{ {
_logger.Trace("Unknown quality. skipping size check."); _logger.Debug("Unknown quality. skipping size check.");
return false; return false;
} }
@ -52,12 +52,12 @@ namespace NzbDrone.Core.DecisionEngine.Specifications
//If the parsed size is smaller than minSize we don't want it //If the parsed size is smaller than minSize we don't want it
if (subject.Release.Size < minSize) if (subject.Release.Size < minSize)
{ {
_logger.Trace("Item: {0}, Size: {1} is smaller than minimum allowed size ({2}), rejecting.", subject, subject.Release.Size, minSize); _logger.Debug("Item: {0}, Size: {1} is smaller than minimum allowed size ({2}), rejecting.", subject, subject.Release.Size, minSize);
return false; return false;
} }
if (qualityDefinition.MaxSize == 0) if (qualityDefinition.MaxSize == 0)
{ {
_logger.Trace("Max size is 0 (unlimited) - skipping check."); _logger.Debug("Max size is 0 (unlimited) - skipping check.");
} }
else else
{ {
@ -75,11 +75,11 @@ namespace NzbDrone.Core.DecisionEngine.Specifications
//If the parsed size is greater than maxSize we don't want it //If the parsed size is greater than maxSize we don't want it
if (subject.Release.Size > maxSize) if (subject.Release.Size > maxSize)
{ {
_logger.Trace("Item: {0}, Size: {1} is greater than maximum allowed size ({2}), rejecting.", subject, subject.Release.Size, maxSize); _logger.Debug("Item: {0}, Size: {1} is greater than maximum allowed size ({2}), rejecting.", subject, subject.Release.Size, maxSize);
return false; return false;
} }
} }
_logger.Trace("Item: {0}, meets size constraints.", subject); _logger.Debug("Item: {0}, meets size constraints.", subject);
return true; return true;
} }
} }

View File

@ -31,13 +31,13 @@ namespace NzbDrone.Core.DecisionEngine.Specifications
{ {
if (!_configService.EnableFailedDownloadHandling) if (!_configService.EnableFailedDownloadHandling)
{ {
_logger.Trace("Failed Download Handling is not enabled"); _logger.Debug("Failed Download Handling is not enabled");
return true; return true;
} }
if (_blacklistService.Blacklisted(subject.Series.Id, subject.Release.Title)) if (_blacklistService.Blacklisted(subject.Series.Id, subject.Release.Title))
{ {
_logger.Trace("{0} is blacklisted, rejecting.", subject.Release.Title); _logger.Debug("{0} is blacklisted, rejecting.", subject.Release.Title);
return false; return false;
} }

View File

@ -28,12 +28,12 @@ namespace NzbDrone.Core.DecisionEngine.Specifications
{ {
foreach (var file in subject.Episodes.Where(c => c.EpisodeFileId != 0).Select(c => c.EpisodeFile.Value)) foreach (var file in subject.Episodes.Where(c => c.EpisodeFileId != 0).Select(c => c.EpisodeFile.Value))
{ {
_logger.Trace("Comparing file quality with report. Existing file is {0}", file.Quality); _logger.Debug("Comparing file quality with report. Existing file is {0}", file.Quality);
if (!_qualityUpgradableSpecification.CutoffNotMet(subject.Series.QualityProfile, file.Quality, subject.ParsedEpisodeInfo.Quality)) if (!_qualityUpgradableSpecification.CutoffNotMet(subject.Series.QualityProfile, file.Quality, subject.ParsedEpisodeInfo.Quality))
{ {
_logger.Trace("Cutoff already met, rejecting."); _logger.Debug("Cutoff already met, rejecting.");
return false; return false;
} }
} }

View File

@ -24,10 +24,10 @@ namespace NzbDrone.Core.DecisionEngine.Specifications
public virtual bool IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteria) public virtual bool IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteria)
{ {
_logger.Trace("Checking if report meets language requirements. {0}", subject.ParsedEpisodeInfo.Language); _logger.Debug("Checking if report meets language requirements. {0}", subject.ParsedEpisodeInfo.Language);
if (subject.ParsedEpisodeInfo.Language != Language.English) if (subject.ParsedEpisodeInfo.Language != Language.English)
{ {
_logger.Trace("Report Language: {0} rejected because it is not English", subject.ParsedEpisodeInfo.Language); _logger.Debug("Report Language: {0} rejected because it is not English", subject.ParsedEpisodeInfo.Language);
return false; return false;
} }

View File

@ -41,7 +41,7 @@ namespace NzbDrone.Core.DecisionEngine.Specifications
if (IsInQueue(subject, queue)) if (IsInQueue(subject, queue))
{ {
_logger.Trace("Already in queue, rejecting."); _logger.Debug("Already in queue, rejecting.");
return false; return false;
} }

View File

@ -27,13 +27,13 @@ namespace NzbDrone.Core.DecisionEngine.Specifications
public virtual bool IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteria) public virtual bool IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteria)
{ {
_logger.Trace("Checking if release contains any restricted terms: {0}", subject); _logger.Debug("Checking if release contains any restricted terms: {0}", subject);
var restrictionsString = _configService.ReleaseRestrictions; var restrictionsString = _configService.ReleaseRestrictions;
if (String.IsNullOrWhiteSpace(restrictionsString)) if (String.IsNullOrWhiteSpace(restrictionsString))
{ {
_logger.Trace("No restrictions configured, allowing: {0}", subject); _logger.Debug("No restrictions configured, allowing: {0}", subject);
return true; return true;
} }
@ -43,12 +43,12 @@ namespace NzbDrone.Core.DecisionEngine.Specifications
{ {
if (subject.Release.Title.ToLowerInvariant().Contains(restriction.ToLowerInvariant())) if (subject.Release.Title.ToLowerInvariant().Contains(restriction.ToLowerInvariant()))
{ {
_logger.Trace("{0} is restricted: {1}", subject, restriction); _logger.Debug("{0} is restricted: {1}", subject, restriction);
return false; return false;
} }
} }
_logger.Trace("No restrictions apply, allowing: {0}", subject); _logger.Debug("No restrictions apply, allowing: {0}", subject);
return true; return true;
} }
} }

View File

@ -18,7 +18,7 @@ namespace NzbDrone.Core.DecisionEngine.Specifications
{ {
if (subject.Release.Title.ToLower().Contains("sample") && subject.Release.Size < 70.Megabytes()) if (subject.Release.Title.ToLower().Contains("sample") && subject.Release.Size < 70.Megabytes())
{ {
_logger.Trace("Sample release, rejecting."); _logger.Debug("Sample release, rejecting.");
return false; return false;
} }

View File

@ -23,10 +23,10 @@ namespace NzbDrone.Core.DecisionEngine.Specifications
public virtual bool IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteria) public virtual bool IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase searchCriteria)
{ {
_logger.Trace("Checking if report meets quality requirements. {0}", subject.ParsedEpisodeInfo.Quality); _logger.Debug("Checking if report meets quality requirements. {0}", subject.ParsedEpisodeInfo.Quality);
if (!subject.Series.QualityProfile.Value.Items.Exists(v => v.Allowed && v.Quality == subject.ParsedEpisodeInfo.Quality.Quality)) if (!subject.Series.QualityProfile.Value.Items.Exists(v => v.Allowed && v.Quality == subject.ParsedEpisodeInfo.Quality.Quality))
{ {
_logger.Trace("Quality {0} rejected by Series' quality profile", subject.ParsedEpisodeInfo.Quality); _logger.Debug("Quality {0} rejected by Series' quality profile", subject.ParsedEpisodeInfo.Quality);
return false; return false;
} }

View File

@ -30,10 +30,10 @@ namespace NzbDrone.Core.DecisionEngine.Specifications
var age = subject.Release.Age; var age = subject.Release.Age;
var retention = _configService.Retention; var retention = _configService.Retention;
_logger.Trace("Checking if report meets retention requirements. {0}", age); _logger.Debug("Checking if report meets retention requirements. {0}", age);
if (retention > 0 && age > retention) if (retention > 0 && age > retention)
{ {
_logger.Trace("Report age: {0} rejected by user's retention limit", age); _logger.Debug("Report age: {0} rejected by user's retention limit", age);
return false; return false;
} }

View File

@ -37,7 +37,7 @@ namespace NzbDrone.Core.DecisionEngine.Specifications.RssSync
{ {
if (searchCriteria != null) if (searchCriteria != null)
{ {
_logger.Trace("Skipping history check during search"); _logger.Debug("Skipping history check during search");
return true; return true;
} }
@ -45,15 +45,15 @@ namespace NzbDrone.Core.DecisionEngine.Specifications.RssSync
if (downloadClient != null && downloadClient.GetType() == typeof (Sabnzbd)) if (downloadClient != null && downloadClient.GetType() == typeof (Sabnzbd))
{ {
_logger.Trace("Performing history status check on report"); _logger.Debug("Performing history status check on report");
foreach (var episode in subject.Episodes) foreach (var episode in subject.Episodes)
{ {
_logger.Trace("Checking current status of episode [{0}] in history", episode.Id); _logger.Debug("Checking current status of episode [{0}] in history", episode.Id);
var mostRecent = _historyService.MostRecentForEpisode(episode.Id); var mostRecent = _historyService.MostRecentForEpisode(episode.Id);
if (mostRecent != null && mostRecent.EventType == HistoryEventType.Grabbed) if (mostRecent != null && mostRecent.EventType == HistoryEventType.Grabbed)
{ {
_logger.Trace("Latest history item is downloading, rejecting."); _logger.Debug("Latest history item is downloading, rejecting.");
return false; return false;
} }
} }
@ -65,7 +65,7 @@ namespace NzbDrone.Core.DecisionEngine.Specifications.RssSync
var bestQualityInHistory = _historyService.GetBestQualityInHistory(subject.Series.QualityProfile, episode.Id); var bestQualityInHistory = _historyService.GetBestQualityInHistory(subject.Series.QualityProfile, episode.Id);
if (bestQualityInHistory != null) if (bestQualityInHistory != null)
{ {
_logger.Trace("Comparing history quality with report. History is {0}", bestQualityInHistory); _logger.Debug("Comparing history quality with report. History is {0}", bestQualityInHistory);
if (!_qualityUpgradableSpecification.IsUpgradable(subject.Series.QualityProfile, bestQualityInHistory, subject.ParsedEpisodeInfo.Quality)) if (!_qualityUpgradableSpecification.IsUpgradable(subject.Series.QualityProfile, bestQualityInHistory, subject.ParsedEpisodeInfo.Quality))
return false; return false;
} }

View File

@ -26,7 +26,7 @@ namespace NzbDrone.Core.DecisionEngine.Specifications.RssSync
{ {
if (searchCriteria != null) if (searchCriteria != null)
{ {
_logger.Trace("Skipping monitored check during search"); _logger.Debug("Skipping monitored check during search");
return true; return true;
} }

View File

@ -41,13 +41,13 @@ namespace NzbDrone.Core.DecisionEngine.Specifications.RssSync
{ {
if (file.DateAdded < DateTime.Today.AddDays(-7)) if (file.DateAdded < DateTime.Today.AddDays(-7))
{ {
_logger.Trace("Proper for old file, rejecting: {0}", subject); _logger.Debug("Proper for old file, rejecting: {0}", subject);
return false; return false;
} }
if (!_configService.AutoDownloadPropers) if (!_configService.AutoDownloadPropers)
{ {
_logger.Trace("Auto downloading of propers is disabled"); _logger.Debug("Auto downloading of propers is disabled");
return false; return false;
} }
} }

View File

@ -38,7 +38,7 @@ namespace NzbDrone.Core.DecisionEngine.Specifications.Search
if (!remoteEpisode.ParsedEpisodeInfo.IsDaily() || remoteEpisode.ParsedEpisodeInfo.AirDate != episode.AirDate) if (!remoteEpisode.ParsedEpisodeInfo.IsDaily() || remoteEpisode.ParsedEpisodeInfo.AirDate != episode.AirDate)
{ {
_logger.Trace("Episode AirDate does not match searched episode number, skipping."); _logger.Debug("Episode AirDate does not match searched episode number, skipping.");
return false; return false;
} }

View File

@ -33,7 +33,7 @@ namespace NzbDrone.Core.DecisionEngine.Specifications.Search
if (singleEpisodeSpec.SeasonNumber != remoteEpisode.ParsedEpisodeInfo.SeasonNumber) if (singleEpisodeSpec.SeasonNumber != remoteEpisode.ParsedEpisodeInfo.SeasonNumber)
{ {
_logger.Trace("Season number does not match searched season number, skipping."); _logger.Debug("Season number does not match searched season number, skipping.");
return false; return false;
} }

View File

@ -28,11 +28,11 @@ namespace NzbDrone.Core.DecisionEngine.Specifications.Search
return true; return true;
} }
_logger.Trace("Checking if series matches searched series"); _logger.Debug("Checking if series matches searched series");
if (remoteEpisode.Series.Id != searchCriteria.Series.Id) if (remoteEpisode.Series.Id != searchCriteria.Series.Id)
{ {
_logger.Trace("Series {0} does not match {1}", remoteEpisode.Series, searchCriteria.Series); _logger.Debug("Series {0} does not match {1}", remoteEpisode.Series, searchCriteria.Series);
return false; return false;
} }

View File

@ -34,13 +34,13 @@ namespace NzbDrone.Core.DecisionEngine.Specifications.Search
if (singleEpisodeSpec.SeasonNumber != remoteEpisode.ParsedEpisodeInfo.SeasonNumber) if (singleEpisodeSpec.SeasonNumber != remoteEpisode.ParsedEpisodeInfo.SeasonNumber)
{ {
_logger.Trace("Season number does not match searched season number, skipping."); _logger.Debug("Season number does not match searched season number, skipping.");
return false; return false;
} }
if (!remoteEpisode.ParsedEpisodeInfo.EpisodeNumbers.Contains(singleEpisodeSpec.EpisodeNumber)) if (!remoteEpisode.ParsedEpisodeInfo.EpisodeNumbers.Contains(singleEpisodeSpec.EpisodeNumber))
{ {
_logger.Trace("Episode number does not match searched episode number, skipping."); _logger.Debug("Episode number does not match searched episode number, skipping.");
return false; return false;
} }

View File

@ -28,7 +28,7 @@ namespace NzbDrone.Core.DecisionEngine.Specifications
{ {
foreach (var file in subject.Episodes.Where(c => c.EpisodeFileId != 0).Select(c => c.EpisodeFile.Value)) foreach (var file in subject.Episodes.Where(c => c.EpisodeFileId != 0).Select(c => c.EpisodeFile.Value))
{ {
_logger.Trace("Comparing file quality with report. Existing file is {0}", file.Quality); _logger.Debug("Comparing file quality with report. Existing file is {0}", file.Quality);
if (!_qualityUpgradableSpecification.IsUpgradable(subject.Series.QualityProfile, file.Quality, subject.ParsedEpisodeInfo.Quality)) if (!_qualityUpgradableSpecification.IsUpgradable(subject.Series.QualityProfile, file.Quality, subject.ParsedEpisodeInfo.Quality))
{ {

View File

@ -33,9 +33,9 @@ namespace NzbDrone.Core.Download.Clients.Blackhole
var filename = Path.Combine(Settings.Folder, title + ".nzb"); var filename = Path.Combine(Settings.Folder, title + ".nzb");
_logger.Trace("Downloading NZB from: {0} to: {1}", url, filename); _logger.Debug("Downloading NZB from: {0} to: {1}", url, filename);
_httpProvider.DownloadFile(url, filename); _httpProvider.DownloadFile(url, filename);
_logger.Trace("NZB Download succeeded, saved to: {0}", filename); _logger.Debug("NZB Download succeeded, saved to: {0}", filename);
return null; return null;
} }

View File

@ -48,7 +48,7 @@ namespace NzbDrone.Core.Download.Clients.Nzbget
{ {
var client = BuildClient(settings); var client = BuildClient(settings);
var response = client.Execute(restRequest); var response = client.Execute(restRequest);
_logger.Trace("Response: {0}", response.Content); _logger.Debug("Response: {0}", response.Content);
CheckForError(response); CheckForError(response);

View File

@ -43,10 +43,10 @@ namespace NzbDrone.Core.Download.Clients.Pneumatic
//Save to the Pneumatic directory (The user will need to ensure its accessible by XBMC) //Save to the Pneumatic directory (The user will need to ensure its accessible by XBMC)
var filename = Path.Combine(Settings.Folder, title + ".nzb"); var filename = Path.Combine(Settings.Folder, title + ".nzb");
logger.Trace("Downloading NZB from: {0} to: {1}", url, filename); logger.Debug("Downloading NZB from: {0} to: {1}", url, filename);
_httpProvider.DownloadFile(url, filename); _httpProvider.DownloadFile(url, filename);
logger.Trace("NZB Download succeeded, saved to: {0}", filename); logger.Debug("NZB Download succeeded, saved to: {0}", filename);
var contents = String.Format("plugin://plugin.program.pneumatic/?mode=strm&type=add_file&nzb={0}&nzbname={1}", filename, title); var contents = String.Format("plugin://plugin.program.pneumatic/?mode=strm&type=add_file&nzb={0}&nzbname={1}", filename, title);
_diskProvider.WriteAllText(Path.Combine(_configService.DownloadedEpisodesFolder, title + ".strm"), contents); _diskProvider.WriteAllText(Path.Combine(_configService.DownloadedEpisodesFolder, title + ".strm"), contents);

View File

@ -5,6 +5,7 @@ using NLog;
using NzbDrone.Common; using NzbDrone.Common;
using NzbDrone.Common.Serializer; using NzbDrone.Common.Serializer;
using NzbDrone.Core.Download.Clients.Sabnzbd.Responses; using NzbDrone.Core.Download.Clients.Sabnzbd.Responses;
using NzbDrone.Core.Instrumentation.Extensions;
using RestSharp; using RestSharp;
namespace NzbDrone.Core.Download.Clients.Sabnzbd namespace NzbDrone.Core.Download.Clients.Sabnzbd
@ -124,7 +125,7 @@ namespace NzbDrone.Core.Download.Clients.Sabnzbd
action, action,
authentication); authentication);
_logger.Trace(url); _logger.CleansedDebug(url);
return new RestClient(url); return new RestClient(url);
} }

View File

@ -1,7 +1,7 @@
using System; using System;
using NLog; using NLog;
using NzbDrone.Common.EnsureThat; using NzbDrone.Common.EnsureThat;
using NzbDrone.Core.Instrumentation; using NzbDrone.Core.Instrumentation.Extensions;
using NzbDrone.Core.Messaging.Events; using NzbDrone.Core.Messaging.Events;
using NzbDrone.Core.Parser.Model; using NzbDrone.Core.Parser.Model;

View File

@ -58,7 +58,7 @@ namespace NzbDrone.Core.Download
if (!failedItems.Any()) if (!failedItems.Any())
{ {
_logger.Trace("Yay! No encrypted downloads"); _logger.Debug("Yay! No encrypted downloads");
return; return;
} }
@ -69,13 +69,13 @@ namespace NzbDrone.Core.Download
if (!historyItems.Any()) if (!historyItems.Any())
{ {
_logger.Trace("Unable to find matching history item"); _logger.Debug("Unable to find matching history item");
continue; continue;
} }
if (failedHistory.Any(h => failedLocal.Id.Equals(h.Data.GetValueOrDefault(DOWNLOAD_CLIENT_ID)))) if (failedHistory.Any(h => failedLocal.Id.Equals(h.Data.GetValueOrDefault(DOWNLOAD_CLIENT_ID))))
{ {
_logger.Trace("Already added to history as failed"); _logger.Debug("Already added to history as failed");
continue; continue;
} }
@ -103,7 +103,7 @@ namespace NzbDrone.Core.Download
if (!failedItems.Any()) if (!failedItems.Any())
{ {
_logger.Trace("Yay! No failed downloads"); _logger.Debug("Yay! No failed downloads");
return; return;
} }
@ -114,13 +114,13 @@ namespace NzbDrone.Core.Download
if (!historyItems.Any()) if (!historyItems.Any())
{ {
_logger.Trace("Unable to find matching history item"); _logger.Debug("Unable to find matching history item");
continue; continue;
} }
if (failedHistory.Any(h => failedLocal.Id.Equals(h.Data.GetValueOrDefault(DOWNLOAD_CLIENT_ID)))) if (failedHistory.Any(h => failedLocal.Id.Equals(h.Data.GetValueOrDefault(DOWNLOAD_CLIENT_ID))))
{ {
_logger.Trace("Already added to history as failed"); _logger.Debug("Already added to history as failed");
continue; continue;
} }
@ -164,7 +164,7 @@ namespace NzbDrone.Core.Download
if (downloadClient == null) if (downloadClient == null)
{ {
_logger.Trace("No download client is configured"); _logger.Debug("No download client is configured");
} }
return downloadClient; return downloadClient;
@ -174,7 +174,7 @@ namespace NzbDrone.Core.Download
{ {
if (!_configService.EnableFailedDownloadHandling) if (!_configService.EnableFailedDownloadHandling)
{ {
_logger.Trace("Failed Download Handling is not enabled"); _logger.Debug("Failed Download Handling is not enabled");
return; return;
} }

View File

@ -32,13 +32,13 @@ namespace NzbDrone.Core.Download
{ {
if (!_configService.AutoRedownloadFailed) if (!_configService.AutoRedownloadFailed)
{ {
_logger.Trace("Auto redownloading failed episodes is disabled"); _logger.Debug("Auto redownloading failed episodes is disabled");
return; return;
} }
if (episodeIds.Count == 1) if (episodeIds.Count == 1)
{ {
_logger.Trace("Failed download only contains one episode, searching again"); _logger.Debug("Failed download only contains one episode, searching again");
_commandExecutor.PublishCommandAsync(new EpisodeSearchCommand _commandExecutor.PublishCommandAsync(new EpisodeSearchCommand
{ {
@ -53,7 +53,7 @@ namespace NzbDrone.Core.Download
if (episodeIds.Count == episodesInSeason.Count) if (episodeIds.Count == episodesInSeason.Count)
{ {
_logger.Trace("Failed download was entire season, searching again"); _logger.Debug("Failed download was entire season, searching again");
_commandExecutor.PublishCommandAsync(new SeasonSearchCommand _commandExecutor.PublishCommandAsync(new SeasonSearchCommand
{ {
@ -64,7 +64,7 @@ namespace NzbDrone.Core.Download
return; return;
} }
_logger.Trace("Failed download contains multiple episodes, probably a double episode, searching again"); _logger.Debug("Failed download contains multiple episodes, probably a double episode, searching again");
_commandExecutor.PublishCommandAsync(new EpisodeSearchCommand _commandExecutor.PublishCommandAsync(new EpisodeSearchCommand
{ {

View File

@ -16,7 +16,7 @@ namespace NzbDrone.Core.Housekeeping.Housekeepers
public void Clean() public void Clean()
{ {
_logger.Trace("Running naming spec cleanup"); _logger.Debug("Running naming spec cleanup");
var mapper = _database.GetDataMapper(); var mapper = _database.GetDataMapper();

View File

@ -16,7 +16,7 @@ namespace NzbDrone.Core.Housekeeping.Housekeepers
public void Clean() public void Clean()
{ {
_logger.Trace("Running orphaned blacklist cleanup"); _logger.Debug("Running orphaned blacklist cleanup");
var mapper = _database.GetDataMapper(); var mapper = _database.GetDataMapper();

View File

@ -16,7 +16,7 @@ namespace NzbDrone.Core.Housekeeping.Housekeepers
public void Clean() public void Clean()
{ {
_logger.Trace("Running orphaned episode files cleanup"); _logger.Debug("Running orphaned episode files cleanup");
var mapper = _database.GetDataMapper(); var mapper = _database.GetDataMapper();

View File

@ -16,7 +16,7 @@ namespace NzbDrone.Core.Housekeeping.Housekeepers
public void Clean() public void Clean()
{ {
_logger.Trace("Running orphaned episodes cleanup"); _logger.Debug("Running orphaned episodes cleanup");
var mapper = _database.GetDataMapper(); var mapper = _database.GetDataMapper();

View File

@ -16,7 +16,7 @@ namespace NzbDrone.Core.Housekeeping.Housekeepers
public void Clean() public void Clean()
{ {
_logger.Trace("Running orphaned history cleanup"); _logger.Debug("Running orphaned history cleanup");
CleanupOrphanedBySeries(); CleanupOrphanedBySeries();
CleanupOrphanedByEpisode(); CleanupOrphanedByEpisode();
} }

View File

@ -16,7 +16,7 @@ namespace NzbDrone.Core.Housekeeping.Housekeepers
public void Clean() public void Clean()
{ {
_logger.Trace("Running orphaned episode files cleanup"); _logger.Debug("Running orphaned episode files cleanup");
DeleteOrphanedBySeries(); DeleteOrphanedBySeries();
DeleteOrphanedByEpisodeFile(); DeleteOrphanedByEpisodeFile();

View File

@ -21,10 +21,10 @@ namespace NzbDrone.Core.Housekeeping.Housekeepers
{ {
if (BuildInfo.IsDebug) if (BuildInfo.IsDebug)
{ {
_logger.Trace("Not running scheduled task last execution cleanup during debug"); _logger.Debug("Not running scheduled task last execution cleanup during debug");
} }
_logger.Trace("Running scheduled task last execution cleanup"); _logger.Debug("Running scheduled task last execution cleanup");
var mapper = _database.GetDataMapper(); var mapper = _database.GetDataMapper();
mapper.AddParameter("time", DateTime.UtcNow); mapper.AddParameter("time", DateTime.UtcNow);

View File

@ -18,7 +18,7 @@ namespace NzbDrone.Core.Housekeeping.Housekeepers
public void Clean() public void Clean()
{ {
_logger.Trace("Updating CleanTitle for all series"); _logger.Debug("Updating CleanTitle for all series");
var series = _seriesRepository.All().ToList(); var series = _seriesRepository.All().ToList();

View File

@ -1,6 +1,6 @@
using NLog; using NLog;
using NzbDrone.Core.Download; using NzbDrone.Core.Download;
using NzbDrone.Core.Instrumentation; using NzbDrone.Core.Instrumentation.Extensions;
using NzbDrone.Core.Messaging.Commands; using NzbDrone.Core.Messaging.Commands;
namespace NzbDrone.Core.IndexerSearch namespace NzbDrone.Core.IndexerSearch

View File

@ -8,7 +8,7 @@ using NzbDrone.Core.DecisionEngine;
using NzbDrone.Core.DecisionEngine.Specifications; using NzbDrone.Core.DecisionEngine.Specifications;
using NzbDrone.Core.IndexerSearch.Definitions; using NzbDrone.Core.IndexerSearch.Definitions;
using NzbDrone.Core.Indexers; using NzbDrone.Core.Indexers;
using NzbDrone.Core.Instrumentation; using NzbDrone.Core.Instrumentation.Extensions;
using NzbDrone.Core.Parser.Model; using NzbDrone.Core.Parser.Model;
using NzbDrone.Core.Tv; using NzbDrone.Core.Tv;
using System.Linq; using System.Linq;

View File

@ -1,6 +1,6 @@
using NLog; using NLog;
using NzbDrone.Core.Download; using NzbDrone.Core.Download;
using NzbDrone.Core.Instrumentation; using NzbDrone.Core.Instrumentation.Extensions;
using NzbDrone.Core.Messaging.Commands; using NzbDrone.Core.Messaging.Commands;
namespace NzbDrone.Core.IndexerSearch namespace NzbDrone.Core.IndexerSearch

View File

@ -1,6 +1,6 @@
using NLog; using NLog;
using NzbDrone.Core.Download; using NzbDrone.Core.Download;
using NzbDrone.Core.Instrumentation; using NzbDrone.Core.Instrumentation.Extensions;
using NzbDrone.Core.Messaging.Commands; using NzbDrone.Core.Messaging.Commands;
using NzbDrone.Core.Tv; using NzbDrone.Core.Tv;

View File

@ -5,6 +5,7 @@ using NLog;
using NzbDrone.Common; using NzbDrone.Common;
using NzbDrone.Core.Indexers.Exceptions; using NzbDrone.Core.Indexers.Exceptions;
using NzbDrone.Core.IndexerSearch.Definitions; using NzbDrone.Core.IndexerSearch.Definitions;
using NzbDrone.Core.Instrumentation.Extensions;
using NzbDrone.Core.Parser.Model; using NzbDrone.Core.Parser.Model;
using System.Linq; using System.Linq;
@ -115,7 +116,7 @@ namespace NzbDrone.Core.Indexers
{ {
try try
{ {
_logger.Trace("Downloading Feed " + url); _logger.CleansedDebug("Downloading Feed " + url);
var xml = _httpProvider.DownloadString(url); var xml = _httpProvider.DownloadString(url);
if (!string.IsNullOrWhiteSpace(xml)) if (!string.IsNullOrWhiteSpace(xml))
{ {

View File

@ -35,7 +35,7 @@ namespace NzbDrone.Core.Indexers.Newznab
Enable = false, Enable = false,
Name = "Nzb.su", Name = "Nzb.su",
Implementation = GetType().Name, Implementation = GetType().Name,
Settings = GetSettings("https://nzb.su", new List<Int32>()) Settings = GetSettings("https://api.nzb.su", new List<Int32>())
}); });
list.Add(new IndexerDefinition list.Add(new IndexerDefinition

View File

@ -82,7 +82,7 @@ namespace NzbDrone.Core.Indexers
throw new SizeParsingException("Unable to parse size from: {0} [{1}]", reportInfo.Title, url); throw new SizeParsingException("Unable to parse size from: {0} [{1}]", reportInfo.Title, url);
} }
_logger.Trace("Parsed: {0} from: {1}", reportInfo, item.Title()); _logger.Trace("Parsed: {0}", item.Title());
return PostProcessor(item, reportInfo); return PostProcessor(item, reportInfo);
} }

View File

@ -2,7 +2,7 @@
using NLog; using NLog;
using NzbDrone.Core.DecisionEngine; using NzbDrone.Core.DecisionEngine;
using NzbDrone.Core.Download; using NzbDrone.Core.Download;
using NzbDrone.Core.Instrumentation; using NzbDrone.Core.Instrumentation.Extensions;
using NzbDrone.Core.Messaging.Commands; using NzbDrone.Core.Messaging.Commands;
namespace NzbDrone.Core.Indexers namespace NzbDrone.Core.Indexers

View File

@ -0,0 +1,46 @@
using System;
using System.Text.RegularExpressions;
using NLog;
namespace NzbDrone.Core.Instrumentation.Extensions
{
public static class LoggerCleansedExtensions
{
private static readonly Regex CleansingRegex = new Regex(@"(?<=apikey=)(\w+?)(?=\W|$|_)", RegexOptions.Compiled | RegexOptions.IgnoreCase);
public static void CleansedInfo(this Logger logger, string message, params object[] args)
{
var formattedMessage = String.Format(message, args);
LogCleansedMessage(logger, LogLevel.Info, formattedMessage);
}
public static void CleansedDebug(this Logger logger, string message, params object[] args)
{
var formattedMessage = String.Format(message, args);
LogCleansedMessage(logger, LogLevel.Debug, formattedMessage);
}
public static void CleansedTrace(this Logger logger, string message, params object[] args)
{
var formattedMessage = String.Format(message, args);
LogCleansedMessage(logger, LogLevel.Trace, formattedMessage);
}
private static void LogCleansedMessage(Logger logger, LogLevel level, string message)
{
message = Cleanse(message);
var logEvent = new LogEventInfo(level, logger.Name, message);
logEvent.Properties.Add("Status", "");
logger.Log(logEvent);
}
private static string Cleanse(string message)
{
//TODO: password=
return CleansingRegex.Replace(message, "<removed>");
}
}
}

View File

@ -1,7 +1,7 @@
using System; using System;
using NLog; using NLog;
namespace NzbDrone.Core.Instrumentation namespace NzbDrone.Core.Instrumentation.Extensions
{ {
public static class LoggerExtensions public static class LoggerExtensions
{ {

View File

@ -93,7 +93,7 @@ namespace NzbDrone.Core.Jobs
if (scheduledTask != null) if (scheduledTask != null)
{ {
_logger.Trace("Updating last run time for: {0}", scheduledTask.TypeName); _logger.Debug("Updating last run time for: {0}", scheduledTask.TypeName);
_scheduledTaskRepository.SetLastExecutionTime(scheduledTask.Id, DateTime.UtcNow); _scheduledTaskRepository.SetLastExecutionTime(scheduledTask.Id, DateTime.UtcNow);
} }
} }

View File

@ -1,9 +1,7 @@
using System; using NLog;
using NLog;
using NzbDrone.Common; using NzbDrone.Common;
using NzbDrone.Common.EnvironmentInfo; using NzbDrone.Common.EnvironmentInfo;
using NzbDrone.Common.Processes; using NzbDrone.Common.Processes;
using NzbDrone.Core.Instrumentation;
using NzbDrone.Core.Lifecycle.Commands; using NzbDrone.Core.Lifecycle.Commands;
using NzbDrone.Core.Messaging.Commands; using NzbDrone.Core.Messaging.Commands;
using NzbDrone.Core.Messaging.Events; using NzbDrone.Core.Messaging.Events;

View File

@ -1,11 +1,9 @@
using System; using System.IO;
using System.IO;
using System.Linq; using System.Linq;
using NLog; using NLog;
using NzbDrone.Common;
using NzbDrone.Common.Disk; using NzbDrone.Common.Disk;
using NzbDrone.Core.Configuration; using NzbDrone.Core.Configuration;
using NzbDrone.Core.Instrumentation; using NzbDrone.Core.Instrumentation.Extensions;
using NzbDrone.Core.MediaFiles.Commands; using NzbDrone.Core.MediaFiles.Commands;
using NzbDrone.Core.MediaFiles.EpisodeImport; using NzbDrone.Core.MediaFiles.EpisodeImport;
using NzbDrone.Core.MediaFiles.Events; using NzbDrone.Core.MediaFiles.Events;

View File

@ -102,7 +102,7 @@ namespace NzbDrone.Core.MediaFiles
var cleanedUpName = GetCleanedUpFolderName(subfolderInfo.Name); var cleanedUpName = GetCleanedUpFolderName(subfolderInfo.Name);
var series = _parsingService.GetSeries(cleanedUpName); var series = _parsingService.GetSeries(cleanedUpName);
var quality = QualityParser.ParseQuality(cleanedUpName); var quality = QualityParser.ParseQuality(cleanedUpName);
_logger.Trace("{0} folder quality: {1}", cleanedUpName, quality); _logger.Debug("{0} folder quality: {1}", cleanedUpName, quality);
if (series == null) if (series == null)
{ {

View File

@ -50,7 +50,7 @@ namespace NzbDrone.Core.MediaFiles
var newFileName = _buildFileNames.BuildFilename(episodes, series, episodeFile); var newFileName = _buildFileNames.BuildFilename(episodes, series, episodeFile);
var filePath = _buildFileNames.BuildFilePath(series, episodes.First().SeasonNumber, newFileName, Path.GetExtension(episodeFile.Path)); var filePath = _buildFileNames.BuildFilePath(series, episodes.First().SeasonNumber, newFileName, Path.GetExtension(episodeFile.Path));
_logger.Trace("Renaming episode file: {0} to {1}", episodeFile, filePath); _logger.Debug("Renaming episode file: {0} to {1}", episodeFile, filePath);
return MoveFile(episodeFile, series, episodes, filePath); return MoveFile(episodeFile, series, episodes, filePath);
} }
@ -60,7 +60,7 @@ namespace NzbDrone.Core.MediaFiles
var newFileName = _buildFileNames.BuildFilename(localEpisode.Episodes, localEpisode.Series, episodeFile); var newFileName = _buildFileNames.BuildFilename(localEpisode.Episodes, localEpisode.Series, episodeFile);
var filePath = _buildFileNames.BuildFilePath(localEpisode.Series, localEpisode.SeasonNumber, newFileName, Path.GetExtension(episodeFile.Path)); var filePath = _buildFileNames.BuildFilePath(localEpisode.Series, localEpisode.SeasonNumber, newFileName, Path.GetExtension(episodeFile.Path));
_logger.Trace("Moving episode file: {0} to {1}", episodeFile, filePath); _logger.Debug("Moving episode file: {0} to {1}", episodeFile, filePath);
return MoveFile(episodeFile, localEpisode.Series, localEpisode.Episodes, filePath); return MoveFile(episodeFile, localEpisode.Series, localEpisode.Episodes, filePath);
} }
@ -110,14 +110,14 @@ namespace NzbDrone.Core.MediaFiles
try try
{ {
_logger.Trace("Setting last write time on series folder: {0}", series.Path); _logger.Debug("Setting last write time on series folder: {0}", series.Path);
_diskProvider.FolderSetLastWriteTimeUtc(series.Path, episodeFile.DateAdded); _diskProvider.FolderSetLastWriteTimeUtc(series.Path, episodeFile.DateAdded);
if (series.SeasonFolder) if (series.SeasonFolder)
{ {
var seasonFolder = Path.GetDirectoryName(destinationFilename); var seasonFolder = Path.GetDirectoryName(destinationFilename);
_logger.Trace("Setting last write time on season folder: {0}", seasonFolder); _logger.Debug("Setting last write time on season folder: {0}", seasonFolder);
_diskProvider.FolderSetLastWriteTimeUtc(seasonFolder, episodeFile.DateAdded); _diskProvider.FolderSetLastWriteTimeUtc(seasonFolder, episodeFile.DateAdded);
} }
} }
@ -140,7 +140,7 @@ namespace NzbDrone.Core.MediaFiles
if (ex is UnauthorizedAccessException || ex is InvalidOperationException) if (ex is UnauthorizedAccessException || ex is InvalidOperationException)
{ {
_logger.Debug("Unable to apply folder permissions to: ", destinationFilename); _logger.Debug("Unable to apply folder permissions to: ", destinationFilename);
_logger.TraceException(ex.Message, ex); _logger.DebugException(ex.Message, ex);
} }
else else
@ -175,7 +175,7 @@ namespace NzbDrone.Core.MediaFiles
if (ex is UnauthorizedAccessException || ex is InvalidOperationException) if (ex is UnauthorizedAccessException || ex is InvalidOperationException)
{ {
_logger.Debug("Unable to apply permissions to: ", path); _logger.Debug("Unable to apply permissions to: ", path);
_logger.TraceException(ex.Message, ex); _logger.DebugException(ex.Message, ex);
} }
else else
{ {

View File

@ -63,12 +63,12 @@ namespace NzbDrone.Core.MediaFiles.EpisodeImport
{ {
if (quality != null && new QualityModelComparer(parsedEpisode.Series.QualityProfile).Compare(quality, parsedEpisode.Quality) > 0) if (quality != null && new QualityModelComparer(parsedEpisode.Series.QualityProfile).Compare(quality, parsedEpisode.Quality) > 0)
{ {
_logger.Trace("Using quality from folder: {0}", quality); _logger.Debug("Using quality from folder: {0}", quality);
parsedEpisode.Quality = quality; parsedEpisode.Quality = quality;
} }
parsedEpisode.Size = _diskProvider.GetFileSize(file); parsedEpisode.Size = _diskProvider.GetFileSize(file);
_logger.Trace("Size: {0}", parsedEpisode.Size); _logger.Debug("Size: {0}", parsedEpisode.Size);
decision = GetDecision(parsedEpisode); decision = GetDecision(parsedEpisode);
} }

View File

@ -26,7 +26,7 @@ namespace NzbDrone.Core.MediaFiles.EpisodeImport.Specifications
{ {
if (localEpisode.ExistingFile) if (localEpisode.ExistingFile)
{ {
_logger.Trace("Skipping free space check for existing episode"); _logger.Debug("Skipping free space check for existing episode");
return true; return true;
} }
@ -35,7 +35,7 @@ namespace NzbDrone.Core.MediaFiles.EpisodeImport.Specifications
if (!freeSpace.HasValue) if (!freeSpace.HasValue)
{ {
_logger.Trace("Free space check returned an invalid result for: {0}", path); _logger.Debug("Free space check returned an invalid result for: {0}", path);
return true; return true;
} }

View File

@ -21,7 +21,7 @@ namespace NzbDrone.Core.MediaFiles.EpisodeImport.Specifications
{ {
if (localEpisode.ParsedEpisodeInfo.FullSeason) if (localEpisode.ParsedEpisodeInfo.FullSeason)
{ {
_logger.Trace("Single episode file detected as containing all episodes in the season"); _logger.Debug("Single episode file detected as containing all episodes in the season");
return false; return false;
} }

View File

@ -21,13 +21,13 @@ namespace NzbDrone.Core.MediaFiles.EpisodeImport.Specifications
{ {
if (localEpisode.ExistingFile) if (localEpisode.ExistingFile)
{ {
_logger.Trace("{0} is in series folder, skipping in use check", localEpisode.Path); _logger.Debug("{0} is in series folder, skipping in use check", localEpisode.Path);
return true; return true;
} }
if (_diskProvider.IsFileLocked(localEpisode.Path)) if (_diskProvider.IsFileLocked(localEpisode.Path))
{ {
_logger.Trace("{0} is in use"); _logger.Debug("{0} is in use");
return false; return false;
} }

View File

@ -37,19 +37,19 @@ namespace NzbDrone.Core.MediaFiles.EpisodeImport.Specifications
{ {
if (localEpisode.ExistingFile) if (localEpisode.ExistingFile)
{ {
_logger.Trace("Existing file, skipping sample check"); _logger.Debug("Existing file, skipping sample check");
return true; return true;
} }
if (localEpisode.Series.SeriesType == SeriesTypes.Daily) if (localEpisode.Series.SeriesType == SeriesTypes.Daily)
{ {
_logger.Trace("Daily Series, skipping sample check"); _logger.Debug("Daily Series, skipping sample check");
return true; return true;
} }
if (localEpisode.SeasonNumber == 0) if (localEpisode.SeasonNumber == 0)
{ {
_logger.Trace("Special, skipping sample check"); _logger.Debug("Special, skipping sample check");
return true; return true;
} }
@ -57,7 +57,7 @@ namespace NzbDrone.Core.MediaFiles.EpisodeImport.Specifications
if (extension != null && extension.Equals(".flv", StringComparison.InvariantCultureIgnoreCase)) if (extension != null && extension.Equals(".flv", StringComparison.InvariantCultureIgnoreCase))
{ {
_logger.Trace("Skipping sample check for .flv file"); _logger.Debug("Skipping sample check for .flv file");
return true; return true;
} }
@ -73,19 +73,19 @@ namespace NzbDrone.Core.MediaFiles.EpisodeImport.Specifications
if (runTime.TotalSeconds < 90) if (runTime.TotalSeconds < 90)
{ {
_logger.Trace("[{0}] appears to be a sample. Size: {1} Runtime: {2}", localEpisode.Path, localEpisode.Size, runTime); _logger.Debug("[{0}] appears to be a sample. Size: {1} Runtime: {2}", localEpisode.Path, localEpisode.Size, runTime);
return false; return false;
} }
} }
catch (DllNotFoundException) catch (DllNotFoundException)
{ {
_logger.Trace("Falling back to file size detection"); _logger.Debug("Falling back to file size detection");
return CheckSize(localEpisode); return CheckSize(localEpisode);
} }
_logger.Trace("Runtime is over 90 seconds"); _logger.Debug("Runtime is over 90 seconds");
return true; return true;
} }
@ -95,14 +95,14 @@ namespace NzbDrone.Core.MediaFiles.EpisodeImport.Specifications
{ {
if (localEpisode.Size < SampleSizeLimit * 2) if (localEpisode.Size < SampleSizeLimit * 2)
{ {
_logger.Trace("1080p file is less than sample limit"); _logger.Debug("1080p file is less than sample limit");
return false; return false;
} }
} }
if (localEpisode.Size < SampleSizeLimit) if (localEpisode.Size < SampleSizeLimit)
{ {
_logger.Trace("File is less than sample limit"); _logger.Debug("File is less than sample limit");
return false; return false;
} }

View File

@ -28,7 +28,7 @@ namespace NzbDrone.Core.MediaFiles.EpisodeImport.Specifications
{ {
if (localEpisode.ExistingFile) if (localEpisode.ExistingFile)
{ {
_logger.Trace("{0} is in series folder, unpacking check", localEpisode.Path); _logger.Debug("{0} is in series folder, unpacking check", localEpisode.Path);
return true; return true;
} }
@ -38,13 +38,13 @@ namespace NzbDrone.Core.MediaFiles.EpisodeImport.Specifications
{ {
if (OsInfo.IsMono) if (OsInfo.IsMono)
{ {
_logger.Trace("{0} is still being unpacked", localEpisode.Path); _logger.Debug("{0} is still being unpacked", localEpisode.Path);
return false; return false;
} }
if (_diskProvider.FileGetLastWriteUtc(localEpisode.Path) > DateTime.UtcNow.AddMinutes(-5)) if (_diskProvider.FileGetLastWriteUtc(localEpisode.Path) > DateTime.UtcNow.AddMinutes(-5))
{ {
_logger.Trace("{0} appears to be unpacking still", localEpisode.Path); _logger.Debug("{0} appears to be unpacking still", localEpisode.Path);
return false; return false;
} }
} }

View File

@ -22,7 +22,7 @@ namespace NzbDrone.Core.MediaFiles.EpisodeImport.Specifications
var qualityComparer = new QualityModelComparer(localEpisode.Series.QualityProfile); var qualityComparer = new QualityModelComparer(localEpisode.Series.QualityProfile);
if (localEpisode.Episodes.Any(e => e.EpisodeFileId != 0 && qualityComparer.Compare(e.EpisodeFile.Value.Quality, localEpisode.Quality) > 0)) if (localEpisode.Episodes.Any(e => e.EpisodeFileId != 0 && qualityComparer.Compare(e.EpisodeFile.Value.Quality, localEpisode.Quality) > 0))
{ {
_logger.Trace("This file isn't an upgrade for all episodes. Skipping {0}", localEpisode.Path); _logger.Debug("This file isn't an upgrade for all episodes. Skipping {0}", localEpisode.Path);
return false; return false;
} }

View File

@ -43,21 +43,21 @@ namespace NzbDrone.Core.MediaFiles
{ {
if (!_diskProvider.FileExists(episodeFile.Path)) if (!_diskProvider.FileExists(episodeFile.Path))
{ {
_logger.Trace("File [{0}] no longer exists on disk, removing from db", episodeFile.Path); _logger.Debug("File [{0}] no longer exists on disk, removing from db", episodeFile.Path);
_mediaFileService.Delete(episodeFile); _mediaFileService.Delete(episodeFile);
continue; continue;
} }
if (!DiskProviderBase.IsParent(series.Path, episodeFile.Path)) if (!DiskProviderBase.IsParent(series.Path, episodeFile.Path))
{ {
_logger.Trace("File [{0}] does not belong to this series, removing from db", episodeFile.Path); _logger.Debug("File [{0}] does not belong to this series, removing from db", episodeFile.Path);
_mediaFileService.Delete(episodeFile); _mediaFileService.Delete(episodeFile);
continue; continue;
} }
if (!episodes.Any(e => e.EpisodeFileId == episodeFile.Id)) if (!episodes.Any(e => e.EpisodeFileId == episodeFile.Id))
{ {
_logger.Trace("File [{0}] is not assigned to any episodes, removing from db", episodeFile.Path); _logger.Debug("File [{0}] is not assigned to any episodes, removing from db", episodeFile.Path);
_mediaFileService.Delete(episodeFile); _mediaFileService.Delete(episodeFile);
continue; continue;
} }
@ -66,7 +66,7 @@ namespace NzbDrone.Core.MediaFiles
// //
// if (localEpsiode == null || episodes.Count != localEpsiode.Episodes.Count) // if (localEpsiode == null || episodes.Count != localEpsiode.Episodes.Count)
// { // {
// _logger.Trace("File [{0}] parsed episodes has changed, removing from db", episodeFile.Path); // _logger.Debug("File [{0}] parsed episodes has changed, removing from db", episodeFile.Path);
// _mediaFileService.Delete(episodeFile); // _mediaFileService.Delete(episodeFile);
// continue; // continue;
// } // }

View File

@ -36,7 +36,7 @@ namespace NzbDrone.Core.MediaFiles.MediaInfo
try try
{ {
mediaInfo = new MediaInfoLib.MediaInfo(); mediaInfo = new MediaInfoLib.MediaInfo();
_logger.Trace("Getting media info from {0}", filename); _logger.Debug("Getting media info from {0}", filename);
mediaInfo.Option("ParseSpeed", "0.2"); mediaInfo.Option("ParseSpeed", "0.2");
int open = mediaInfo.Open(filename); int open = mediaInfo.Open(filename);

View File

@ -50,10 +50,10 @@ namespace NzbDrone.Core.MediaFiles
{ {
var destination = Path.Combine(recyclingBin, new DirectoryInfo(path).Name); var destination = Path.Combine(recyclingBin, new DirectoryInfo(path).Name);
logger.Trace("Moving '{0}' to '{1}'", path, destination); logger.Debug("Moving '{0}' to '{1}'", path, destination);
_diskProvider.MoveFolder(path, destination); _diskProvider.MoveFolder(path, destination);
logger.Trace("Setting last accessed: {0}", path); logger.Debug("Setting last accessed: {0}", path);
_diskProvider.FolderSetLastWriteTimeUtc(destination, DateTime.UtcNow); _diskProvider.FolderSetLastWriteTimeUtc(destination, DateTime.UtcNow);
foreach (var file in _diskProvider.GetFiles(destination, SearchOption.AllDirectories)) foreach (var file in _diskProvider.GetFiles(destination, SearchOption.AllDirectories))
{ {
@ -75,21 +75,21 @@ namespace NzbDrone.Core.MediaFiles
if (!OsInfo.IsMono) if (!OsInfo.IsMono)
{ {
logger.Trace(_diskProvider.GetFileAttributes(path)); logger.Debug(_diskProvider.GetFileAttributes(path));
} }
_diskProvider.DeleteFile(path); _diskProvider.DeleteFile(path);
logger.Trace("File has been permanently deleted: {0}", path); logger.Debug("File has been permanently deleted: {0}", path);
} }
else else
{ {
var destination = Path.Combine(recyclingBin, new FileInfo(path).Name); var destination = Path.Combine(recyclingBin, new FileInfo(path).Name);
logger.Trace("Moving '{0}' to '{1}'", path, destination); logger.Debug("Moving '{0}' to '{1}'", path, destination);
_diskProvider.MoveFile(path, destination); _diskProvider.MoveFile(path, destination);
_diskProvider.FileSetLastWriteTimeUtc(destination, DateTime.UtcNow); _diskProvider.FileSetLastWriteTimeUtc(destination, DateTime.UtcNow);
logger.Trace("File has been moved to the recycling bin: {0}", destination); logger.Debug("File has been moved to the recycling bin: {0}", destination);
} }
} }
@ -113,7 +113,7 @@ namespace NzbDrone.Core.MediaFiles
_diskProvider.DeleteFile(file); _diskProvider.DeleteFile(file);
} }
logger.Trace("Recycling Bin has been emptied."); logger.Debug("Recycling Bin has been emptied.");
} }
public void Cleanup() public void Cleanup()
@ -130,7 +130,7 @@ namespace NzbDrone.Core.MediaFiles
{ {
if (_diskProvider.FolderGetLastWrite(folder).AddDays(7) > DateTime.UtcNow) if (_diskProvider.FolderGetLastWrite(folder).AddDays(7) > DateTime.UtcNow)
{ {
logger.Trace("Folder hasn't expired yet, skipping: {0}", folder); logger.Debug("Folder hasn't expired yet, skipping: {0}", folder);
continue; continue;
} }
@ -141,14 +141,14 @@ namespace NzbDrone.Core.MediaFiles
{ {
if (_diskProvider.FileGetLastWriteUtc(file).AddDays(7) > DateTime.UtcNow) if (_diskProvider.FileGetLastWriteUtc(file).AddDays(7) > DateTime.UtcNow)
{ {
logger.Trace("File hasn't expired yet, skipping: {0}", file); logger.Debug("File hasn't expired yet, skipping: {0}", file);
continue; continue;
} }
_diskProvider.DeleteFile(file); _diskProvider.DeleteFile(file);
} }
logger.Trace("Recycling Bin has been cleaned up."); logger.Debug("Recycling Bin has been cleaned up.");
} }
public void HandleAsync(SeriesDeletedEvent message) public void HandleAsync(SeriesDeletedEvent message)

View File

@ -4,7 +4,7 @@ using System.IO;
using System.Linq; using System.Linq;
using NLog; using NLog;
using NzbDrone.Common; using NzbDrone.Common;
using NzbDrone.Core.Instrumentation; using NzbDrone.Core.Instrumentation.Extensions;
using NzbDrone.Core.MediaFiles.Commands; using NzbDrone.Core.MediaFiles.Commands;
using NzbDrone.Core.MediaFiles.Events; using NzbDrone.Core.MediaFiles.Events;
using NzbDrone.Core.Messaging.Commands; using NzbDrone.Core.Messaging.Commands;
@ -115,17 +115,17 @@ namespace NzbDrone.Core.MediaFiles
{ {
try try
{ {
_logger.Trace("Renaming episode file: {0}", episodeFile); _logger.Debug("Renaming episode file: {0}", episodeFile);
_episodeFileMover.MoveEpisodeFile(episodeFile, series); _episodeFileMover.MoveEpisodeFile(episodeFile, series);
_mediaFileService.Update(episodeFile); _mediaFileService.Update(episodeFile);
renamed.Add(episodeFile); renamed.Add(episodeFile);
_logger.Trace("Renamed episode file: {0}", episodeFile); _logger.Debug("Renamed episode file: {0}", episodeFile);
} }
catch (SameFilenameException ex) catch (SameFilenameException ex)
{ {
_logger.Trace("File not renamed, source and destination are the same: {0}", ex.Filename); _logger.Debug("File not renamed, source and destination are the same: {0}", ex.Filename);
} }
catch (Exception ex) catch (Exception ex)
{ {
@ -151,7 +151,7 @@ namespace NzbDrone.Core.MediaFiles
public void Execute(RenameSeriesCommand message) public void Execute(RenameSeriesCommand message)
{ {
_logger.Trace("Renaming all files for selected series"); _logger.Debug("Renaming all files for selected series");
var seriesToRename = _seriesService.GetSeries(message.SeriesIds); var seriesToRename = _seriesService.GetSeries(message.SeriesIds);
foreach (var series in seriesToRename) foreach (var series in seriesToRename)

View File

@ -5,7 +5,7 @@ using NLog;
using NzbDrone.Common; using NzbDrone.Common;
using NzbDrone.Common.Disk; using NzbDrone.Common.Disk;
using NzbDrone.Core.Configuration; using NzbDrone.Core.Configuration;
using NzbDrone.Core.Instrumentation; using NzbDrone.Core.Instrumentation.Extensions;
using NzbDrone.Core.MediaFiles.Events; using NzbDrone.Core.MediaFiles.Events;
using NzbDrone.Core.Messaging.Events; using NzbDrone.Core.Messaging.Events;
using NzbDrone.Core.Tv; using NzbDrone.Core.Tv;

View File

@ -46,7 +46,7 @@ namespace NzbDrone.Core.MediaFiles
if (_diskProvider.FileExists(file.Path)) if (_diskProvider.FileExists(file.Path))
{ {
_logger.Trace("Removing existing episode file: {0}", file); _logger.Debug("Removing existing episode file: {0}", file);
_recycleBinProvider.DeleteFile(file.Path); _recycleBinProvider.DeleteFile(file.Path);
} }

View File

@ -39,7 +39,7 @@ namespace NzbDrone.Core.Messaging.Commands
if (_trackCommands.FindExisting(command) != null) if (_trackCommands.FindExisting(command) != null)
{ {
_logger.Debug("Command is already in progress: {0}", command.GetType().Name); _logger.Trace("Command is already in progress: {0}", command.GetType().Name);
return; return;
} }
@ -64,7 +64,7 @@ namespace NzbDrone.Core.Messaging.Commands
if (existingCommand != null) if (existingCommand != null)
{ {
_logger.Debug("Command is already in progress: {0}", command.GetType().Name); _logger.Trace("Command is already in progress: {0}", command.GetType().Name);
return existingCommand; return existingCommand;
} }

View File

@ -1,6 +1,6 @@
using System.Threading; using System.Threading;
using NLog; using NLog;
using NzbDrone.Core.Instrumentation; using NzbDrone.Core.Instrumentation.Extensions;
namespace NzbDrone.Core.Messaging.Commands namespace NzbDrone.Core.Messaging.Commands
{ {

View File

@ -83,7 +83,7 @@ namespace NzbDrone.Core.Messaging.Events
return eventType.Name; return eventType.Name;
} }
return string.Format("{0}<{1}>", eventType.Name.Remove(eventType.Name.IndexOf('`')), eventType.GetGenericArguments()[0].Name); return String.Format("{0}<{1}>", eventType.Name.Remove(eventType.Name.IndexOf('`')), eventType.GetGenericArguments()[0].Name);
} }
} }
} }

View File

@ -151,7 +151,7 @@ namespace NzbDrone.Core.Metadata.Consumers.Xbmc
else else
{ {
_logger.Trace("Unknown episode file metadata: {0}", metadataFile.RelativePath); _logger.Debug("Unknown episode file metadata: {0}", metadataFile.RelativePath);
continue; continue;
} }
@ -237,7 +237,7 @@ namespace NzbDrone.Core.Metadata.Consumers.Xbmc
private MetadataFile WriteTvShowNfo(Series series, List<MetadataFile> existingMetadataFiles) private MetadataFile WriteTvShowNfo(Series series, List<MetadataFile> existingMetadataFiles)
{ {
_logger.Trace("Generating tvshow.nfo for: {0}", series.Title); _logger.Debug("Generating tvshow.nfo for: {0}", series.Title);
var sb = new StringBuilder(); var sb = new StringBuilder();
var xws = new XmlWriterSettings(); var xws = new XmlWriterSettings();
xws.OmitXmlDeclaration = true; xws.OmitXmlDeclaration = true;
@ -310,7 +310,7 @@ namespace NzbDrone.Core.Metadata.Consumers.Xbmc
//TODO: Do we want to overwrite the file if it exists? //TODO: Do we want to overwrite the file if it exists?
if (_diskProvider.FileExists(destination)) if (_diskProvider.FileExists(destination))
{ {
_logger.Trace("Series image: {0} already exists.", image.CoverType); _logger.Debug("Series image: {0} already exists.", image.CoverType);
continue; continue;
} }
@ -453,7 +453,7 @@ namespace NzbDrone.Core.Metadata.Consumers.Xbmc
if (screenshot == null) if (screenshot == null)
{ {
_logger.Trace("Episode screenshot not available"); _logger.Debug("Episode screenshot not available");
return null; return null;
} }

View File

@ -28,7 +28,7 @@ namespace NzbDrone.Core.Metadata.Files
public void Clean(Series series) public void Clean(Series series)
{ {
_logger.Trace("Cleaning missing metadata files for series: {0}", series.Title); _logger.Debug("Cleaning missing metadata files for series: {0}", series.Title);
var metadataFiles = _metadataFileService.GetFilesBySeries(series.Id); var metadataFiles = _metadataFileService.GetFilesBySeries(series.Id);
@ -36,7 +36,7 @@ namespace NzbDrone.Core.Metadata.Files
{ {
if (!_diskProvider.FileExists(Path.Combine(series.Path, metadataFile.RelativePath))) if (!_diskProvider.FileExists(Path.Combine(series.Path, metadataFile.RelativePath)))
{ {
_logger.Trace("Deleting metadata file from database: {0}", metadataFile.RelativePath); _logger.Debug("Deleting metadata file from database: {0}", metadataFile.RelativePath);
_metadataFileService.Delete(metadataFile.Id); _metadataFileService.Delete(metadataFile.Id);
} }
} }

View File

@ -37,7 +37,7 @@ namespace NzbDrone.Core.Metadata
{ {
if (!_diskProvider.FolderExists(message.Series.Path)) return; if (!_diskProvider.FolderExists(message.Series.Path)) return;
_logger.Trace("Looking for existing metadata in {0}", message.Series.Path); _logger.Debug("Looking for existing metadata in {0}", message.Series.Path);
var filesOnDisk = _diskProvider.GetFiles(message.Series.Path, SearchOption.AllDirectories); var filesOnDisk = _diskProvider.GetFiles(message.Series.Path, SearchOption.AllDirectories);
var possibleMetadataFiles = filesOnDisk.Where(c => !MediaFileExtensions.Extensions.Contains(Path.GetExtension(c).ToLower())).ToList(); var possibleMetadataFiles = filesOnDisk.Where(c => !MediaFileExtensions.Extensions.Contains(Path.GetExtension(c).ToLower())).ToList();
@ -60,13 +60,13 @@ namespace NzbDrone.Core.Metadata
if (localEpisode == null) if (localEpisode == null)
{ {
_logger.Trace("Cannot find related episodes for: {0}", possibleMetadataFile); _logger.Debug("Cannot find related episodes for: {0}", possibleMetadataFile);
break; break;
} }
if (localEpisode.Episodes.DistinctBy(e => e.EpisodeFileId).Count() > 1) if (localEpisode.Episodes.DistinctBy(e => e.EpisodeFileId).Count() > 1)
{ {
_logger.Trace("Metadata file: {0} does not match existing files.", possibleMetadataFile); _logger.Debug("Metadata file: {0} does not match existing files.", possibleMetadataFile);
break; break;
} }

View File

@ -82,7 +82,7 @@ namespace NzbDrone.Core.Metadata.Files
public void HandleAsync(SeriesDeletedEvent message) public void HandleAsync(SeriesDeletedEvent message)
{ {
_logger.Trace("Deleting Metadata from database for series: {0}", message.Series); _logger.Debug("Deleting Metadata from database for series: {0}", message.Series);
_repository.DeleteForSeries(message.Series.Id); _repository.DeleteForSeries(message.Series.Id);
} }
@ -101,7 +101,7 @@ namespace NzbDrone.Core.Metadata.Files
} }
} }
_logger.Trace("Deleting Metadata from database for episode file: {0}", episodeFile); _logger.Debug("Deleting Metadata from database for episode file: {0}", episodeFile);
_repository.DeleteForEpisodeFile(episodeFile.Id); _repository.DeleteForEpisodeFile(episodeFile.Id);
} }

View File

@ -61,7 +61,7 @@ namespace NzbDrone.Core.Metadata
{ {
if (_diskProvider.FileExists(path)) if (_diskProvider.FileExists(path))
{ {
_logger.Trace("Image already exists: {0}, will not download again.", path); _logger.Debug("Image already exists: {0}, will not download again.", path);
return; return;
} }

View File

@ -44,7 +44,7 @@ namespace NzbDrone.Core.Notifications.Email
catch(Exception ex) catch(Exception ex)
{ {
_logger.Error("Error sending email. Subject: {0}", email.Subject); _logger.Error("Error sending email. Subject: {0}", email.Subject);
_logger.TraceException(ex.Message, ex); _logger.DebugException(ex.Message, ex);
} }
} }

View File

@ -35,13 +35,13 @@ namespace NzbDrone.Core.Notifications.Growl
_growlConnector = new GrowlConnector(password, hostname, port); _growlConnector = new GrowlConnector(password, hostname, port);
Logger.Trace("Sending Notification to: {0}:{1}", hostname, port); Logger.Debug("Sending Notification to: {0}:{1}", hostname, port);
_growlConnector.Notify(notification); _growlConnector.Notify(notification);
} }
private void Register(string host, int port, string password) private void Register(string host, int port, string password)
{ {
Logger.Trace("Registering NzbDrone with Growl host: {0}:{1}", host, port); Logger.Debug("Registering NzbDrone with Growl host: {0}:{1}", host, port);
_growlConnector = new GrowlConnector(password, host, port); _growlConnector = new GrowlConnector(password, host, port);
_growlConnector.Register(_growlApplication, _notificationTypes.ToArray()); _growlConnector.Register(_growlApplication, _notificationTypes.ToArray());
} }

View File

@ -42,7 +42,7 @@ namespace NzbDrone.Core.Notifications.Plex
{ {
try try
{ {
_logger.Trace("Sending Update Request to Plex Server"); _logger.Debug("Sending Update Request to Plex Server");
var sections = GetSectionKeys(settings); var sections = GetSectionKeys(settings);
sections.ForEach(s => UpdateSection(settings, s)); sections.ForEach(s => UpdateSection(settings, s));
} }
@ -56,7 +56,7 @@ namespace NzbDrone.Core.Notifications.Plex
public List<int> GetSectionKeys(PlexServerSettings settings) public List<int> GetSectionKeys(PlexServerSettings settings)
{ {
_logger.Trace("Getting sections from Plex host: {0}", settings.Host); _logger.Debug("Getting sections from Plex host: {0}", settings.Host);
var url = String.Format("http://{0}:{1}/library/sections", settings.Host, settings.Port); var url = String.Format("http://{0}:{1}/library/sections", settings.Host, settings.Port);
var xmlStream = _httpProvider.DownloadStream(url, null); var xmlStream = _httpProvider.DownloadStream(url, null);
var xDoc = XDocument.Load(xmlStream); var xDoc = XDocument.Load(xmlStream);
@ -68,7 +68,7 @@ namespace NzbDrone.Core.Notifications.Plex
public void UpdateSection(PlexServerSettings settings, int key) public void UpdateSection(PlexServerSettings settings, int key)
{ {
_logger.Trace("Updating Plex host: {0}, Section: {1}", settings.Host, key); _logger.Debug("Updating Plex host: {0}, Section: {1}", settings.Host, key);
var url = String.Format("http://{0}:{1}/library/sections/{2}/refresh", settings.Host, settings.Port, key); var url = String.Format("http://{0}:{1}/library/sections/{2}/refresh", settings.Host, settings.Port, key);
_httpProvider.DownloadString(url); _httpProvider.DownloadString(url);
} }
@ -87,7 +87,7 @@ namespace NzbDrone.Core.Notifications.Plex
public void Execute(TestPlexClientCommand message) public void Execute(TestPlexClientCommand message)
{ {
_logger.Trace("Sending Test Notifcation to Plex Client: {0}", message.Host); _logger.Debug("Sending Test Notifcation to Plex Client: {0}", message.Host);
var command = String.Format("ExecBuiltIn(Notification({0}, {1}))", "Test Notification", "Success! Notifications are setup correctly"); var command = String.Format("ExecBuiltIn(Notification({0}, {1}))", "Test Notification", "Success! Notifications are setup correctly");
var result = SendCommand(message.Host, message.Port, command, message.Username, message.Password); var result = SendCommand(message.Host, message.Port, command, message.Username, message.Password);

View File

@ -36,7 +36,7 @@ namespace NzbDrone.Core.Notifications.Prowl
var client = new ProwlClient(); var client = new ProwlClient();
_logger.Trace("Sending Prowl Notification"); _logger.Debug("Sending Prowl Notification");
var notificationResult = client.SendNotification(notification); var notificationResult = client.SendNotification(notification);
@ -48,7 +48,7 @@ namespace NzbDrone.Core.Notifications.Prowl
catch (Exception ex) catch (Exception ex)
{ {
_logger.TraceException(ex.Message, ex); _logger.DebugException(ex.Message, ex);
_logger.Warn("Invalid API Key: {0}", apiKey); _logger.Warn("Invalid API Key: {0}", apiKey);
} }
} }
@ -62,7 +62,7 @@ namespace NzbDrone.Core.Notifications.Prowl
var client = new ProwlClient(); var client = new ProwlClient();
_logger.Trace("Verifying API Key: {0}", apiKey); _logger.Debug("Verifying API Key: {0}", apiKey);
var verificationResult = client.SendVerification(verificationRequest); var verificationResult = client.SendVerification(verificationRequest);
if (!String.IsNullOrWhiteSpace(verificationResult.ErrorMessage) && if (!String.IsNullOrWhiteSpace(verificationResult.ErrorMessage) &&
@ -74,7 +74,7 @@ namespace NzbDrone.Core.Notifications.Prowl
catch (Exception ex) catch (Exception ex)
{ {
_logger.TraceException(ex.Message, ex); _logger.DebugException(ex.Message, ex);
_logger.Warn("Invalid API Key: {0}", apiKey); _logger.Warn("Invalid API Key: {0}", apiKey);
throw new InvalidApiKeyException("API Key: " + apiKey + " is invalid"); throw new InvalidApiKeyException("API Key: " + apiKey + " is invalid");
} }

View File

@ -33,7 +33,7 @@ namespace NzbDrone.Core.Notifications.Xbmc
{ {
if (!settings.AlwaysUpdate) if (!settings.AlwaysUpdate)
{ {
_logger.Trace("Determining if there are any active players on XBMC host: {0}", settings.Address); _logger.Debug("Determining if there are any active players on XBMC host: {0}", settings.Address);
var activePlayers = GetActivePlayers(settings); var activePlayers = GetActivePlayers(settings);
if (activePlayers.Any(a => a.Type.Equals("video"))) if (activePlayers.Any(a => a.Type.Equals("video")))
@ -77,7 +77,7 @@ namespace NzbDrone.Core.Notifications.Xbmc
public bool CheckForError(string response) public bool CheckForError(string response)
{ {
_logger.Trace("Looking for error in response: {0}", response); _logger.Debug("Looking for error in response: {0}", response);
if (String.IsNullOrWhiteSpace(response)) if (String.IsNullOrWhiteSpace(response))
{ {
@ -92,7 +92,7 @@ namespace NzbDrone.Core.Notifications.Xbmc
var errorMessage = response.Substring(errorIndex + 6); var errorMessage = response.Substring(errorIndex + 6);
errorMessage = errorMessage.Substring(0, errorMessage.IndexOfAny(new char[] { '<', ';' })); errorMessage = errorMessage.Substring(0, errorMessage.IndexOfAny(new char[] { '<', ';' }));
_logger.Trace("Error found in response: {0}", errorMessage); _logger.Debug("Error found in response: {0}", errorMessage);
return true; return true;
} }
@ -141,13 +141,13 @@ namespace NzbDrone.Core.Notifications.Xbmc
{ {
try try
{ {
_logger.Trace("Sending Update DB Request to XBMC Host: {0}", settings.Address); _logger.Debug("Sending Update DB Request to XBMC Host: {0}", settings.Address);
var xbmcSeriesPath = GetSeriesPath(settings, series); var xbmcSeriesPath = GetSeriesPath(settings, series);
//If the path is found update it, else update the whole library //If the path is found update it, else update the whole library
if (!String.IsNullOrEmpty(xbmcSeriesPath)) if (!String.IsNullOrEmpty(xbmcSeriesPath))
{ {
_logger.Trace("Updating series [{0}] on XBMC host: {1}", series, settings.Address); _logger.Debug("Updating series [{0}] on XBMC host: {1}", series, settings.Address);
var command = BuildExecBuiltInCommand(String.Format("UpdateLibrary(video,{0})", xbmcSeriesPath)); var command = BuildExecBuiltInCommand(String.Format("UpdateLibrary(video,{0})", xbmcSeriesPath));
SendCommand(settings, command); SendCommand(settings, command);
} }
@ -155,7 +155,7 @@ namespace NzbDrone.Core.Notifications.Xbmc
else else
{ {
//Update the entire library //Update the entire library
_logger.Trace("Series [{0}] doesn't exist on XBMC host: {1}, Updating Entire Library", series, settings.Address); _logger.Debug("Series [{0}] doesn't exist on XBMC host: {1}, Updating Entire Library", series, settings.Address);
var command = BuildExecBuiltInCommand("UpdateLibrary(video)"); var command = BuildExecBuiltInCommand("UpdateLibrary(video)");
SendCommand(settings, command); SendCommand(settings, command);
} }

View File

@ -38,7 +38,7 @@ namespace NzbDrone.Core.Notifications.Xbmc
{ {
if (!settings.AlwaysUpdate) if (!settings.AlwaysUpdate)
{ {
_logger.Trace("Determining if there are any active players on XBMC host: {0}", settings.Address); _logger.Debug("Determining if there are any active players on XBMC host: {0}", settings.Address);
var activePlayers = GetActivePlayers(settings); var activePlayers = GetActivePlayers(settings);
if (activePlayers.Any(a => a.Type.Equals("video"))) if (activePlayers.Any(a => a.Type.Equals("video")))
@ -87,7 +87,7 @@ namespace NzbDrone.Core.Notifications.Xbmc
public bool CheckForError(string response) public bool CheckForError(string response)
{ {
_logger.Trace("Looking for error in response: {0}", response); _logger.Debug("Looking for error in response: {0}", response);
if (String.IsNullOrWhiteSpace(response)) if (String.IsNullOrWhiteSpace(response))
{ {
@ -114,7 +114,7 @@ namespace NzbDrone.Core.Notifications.Xbmc
if (!allSeries.Any()) if (!allSeries.Any())
{ {
_logger.Trace("No TV shows returned from XBMC"); _logger.Debug("No TV shows returned from XBMC");
return null; return null;
} }
@ -140,7 +140,7 @@ namespace NzbDrone.Core.Notifications.Xbmc
if (seriesPath != null) if (seriesPath != null)
{ {
_logger.Trace("Updating series {0} (Path: {1}) on XBMC host: {2}", series, seriesPath, settings.Address); _logger.Debug("Updating series {0} (Path: {1}) on XBMC host: {2}", series, seriesPath, settings.Address);
var parameters = new JObject(new JObject(new JProperty("directory", seriesPath))); var parameters = new JObject(new JObject(new JProperty("directory", seriesPath)));
postJson = BuildJsonRequest("VideoLibrary.Scan", parameters); postJson = BuildJsonRequest("VideoLibrary.Scan", parameters);
@ -148,7 +148,7 @@ namespace NzbDrone.Core.Notifications.Xbmc
else else
{ {
_logger.Trace("Series {0} doesn't exist on XBMC host: {1}, Updating Entire Library", series, _logger.Debug("Series {0} doesn't exist on XBMC host: {1}, Updating Entire Library", series,
settings.Address); settings.Address);
postJson = BuildJsonRequest("VideoLibrary.Scan"); postJson = BuildJsonRequest("VideoLibrary.Scan");
@ -158,12 +158,12 @@ namespace NzbDrone.Core.Notifications.Xbmc
if (CheckForError(response)) return; if (CheckForError(response)) return;
_logger.Trace(" from response"); _logger.Debug(" from response");
var result = Json.Deserialize<XbmcJsonResult<String>>(response); var result = Json.Deserialize<XbmcJsonResult<String>>(response);
if (!result.Result.Equals("OK", StringComparison.InvariantCultureIgnoreCase)) if (!result.Result.Equals("OK", StringComparison.InvariantCultureIgnoreCase))
{ {
_logger.Trace("Failed to update library for: {0}", settings.Address); _logger.Debug("Failed to update library for: {0}", settings.Address);
} }
} }

View File

@ -61,7 +61,7 @@ namespace NzbDrone.Core.Notifications.Xbmc
var response = _httpProvider.PostCommand(settings.Address, settings.Username, settings.Password, postJson.ToString()); var response = _httpProvider.PostCommand(settings.Address, settings.Username, settings.Password, postJson.ToString());
Logger.Trace("Getting version from response"); Logger.Debug("Getting version from response");
var result = Json.Deserialize<XbmcJsonResult<JObject>>(response); var result = Json.Deserialize<XbmcJsonResult<JObject>>(response);
var versionObject = result.Result.Property("version"); var versionObject = result.Result.Property("version");
@ -108,9 +108,9 @@ namespace NzbDrone.Core.Notifications.Xbmc
DisplayTime = message.DisplayTime DisplayTime = message.DisplayTime
}; };
Logger.Trace("Determining version of XBMC Host: {0}", settings.Address); Logger.Debug("Determining version of XBMC Host: {0}", settings.Address);
var version = GetJsonVersion(settings); var version = GetJsonVersion(settings);
Logger.Trace("Version is: {0}", version); Logger.Debug("Version is: {0}", version);
if (version == new XbmcVersion(0)) if (version == new XbmcVersion(0))
{ {

View File

@ -308,6 +308,8 @@
<Compile Include="Instrumentation\Commands\DeleteLogFilesCommand.cs" /> <Compile Include="Instrumentation\Commands\DeleteLogFilesCommand.cs" />
<Compile Include="Instrumentation\Commands\TrimLogCommand.cs" /> <Compile Include="Instrumentation\Commands\TrimLogCommand.cs" />
<Compile Include="Instrumentation\DeleteLogFilesService.cs" /> <Compile Include="Instrumentation\DeleteLogFilesService.cs" />
<Compile Include="Instrumentation\Extensions\LoggerCleansedExtensions.cs" />
<Compile Include="Instrumentation\Extensions\LoggerProgressExtensions.cs" />
<Compile Include="MediaFiles\Commands\RenameSeriesCommand.cs" /> <Compile Include="MediaFiles\Commands\RenameSeriesCommand.cs" />
<Compile Include="MediaFiles\Commands\RescanSeriesCommand.cs" /> <Compile Include="MediaFiles\Commands\RescanSeriesCommand.cs" />
<Compile Include="Lifecycle\Commands\ShutdownCommand.cs" /> <Compile Include="Lifecycle\Commands\ShutdownCommand.cs" />
@ -368,7 +370,6 @@
<Compile Include="Notifications\NotifyMyAndroid\NotifyMyAndroidProxy.cs" /> <Compile Include="Notifications\NotifyMyAndroid\NotifyMyAndroidProxy.cs" />
<Compile Include="Notifications\NotifyMyAndroid\NotifyMyAndroidSettings.cs" /> <Compile Include="Notifications\NotifyMyAndroid\NotifyMyAndroidSettings.cs" />
<Compile Include="Notifications\NotifyMyAndroid\TestNotifyMyAndroidCommand.cs" /> <Compile Include="Notifications\NotifyMyAndroid\TestNotifyMyAndroidCommand.cs" />
<Compile Include="Instrumentation\LoggerExtensions.cs" />
<Compile Include="MediaFiles\Commands\BackendCommandAttribute.cs" /> <Compile Include="MediaFiles\Commands\BackendCommandAttribute.cs" />
<Compile Include="Messaging\Commands\BackendCommandAttribute.cs" /> <Compile Include="Messaging\Commands\BackendCommandAttribute.cs" />
<Compile Include="Messaging\Commands\Command.cs" /> <Compile Include="Messaging\Commands\Command.cs" />

View File

@ -29,5 +29,10 @@ namespace NzbDrone.Core.Parser.Model
} }
public int TvRageId { get; set; } public int TvRageId { get; set; }
public override string ToString()
{
return String.Format("[{0}] {1} [{2}]", PublishDate, Title, Size);
}
} }
} }

View File

@ -1,6 +1,5 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Diagnostics;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
@ -129,7 +128,7 @@ namespace NzbDrone.Core.Parser
if (result == null) if (result == null)
{ {
Logger.Trace("Attempting to parse episode info using full path. {0}", fileInfo.FullName); Logger.Debug("Attempting to parse episode info using full path. {0}", fileInfo.FullName);
result = ParseTitle(fileInfo.FullName); result = ParseTitle(fileInfo.FullName);
} }
@ -150,7 +149,7 @@ namespace NzbDrone.Core.Parser
{ {
if (!ValidateBeforeParsing(title)) return null; if (!ValidateBeforeParsing(title)) return null;
Logger.Trace("Parsing string '{0}'", title); Logger.Debug("Parsing string '{0}'", title);
var simpleTitle = SimpleTitleRegex.Replace(title, String.Empty); var simpleTitle = SimpleTitleRegex.Replace(title, String.Empty);
foreach (var regex in ReportTitleRegex) foreach (var regex in ReportTitleRegex)
@ -166,20 +165,20 @@ namespace NzbDrone.Core.Parser
if (result != null) if (result != null)
{ {
result.Language = ParseLanguage(title); result.Language = ParseLanguage(title);
Logger.Trace("Language parsed: {0}", result.Language); Logger.Debug("Language parsed: {0}", result.Language);
result.Quality = QualityParser.ParseQuality(title); result.Quality = QualityParser.ParseQuality(title);
Logger.Trace("Quality parsed: {0}", result.Quality); Logger.Debug("Quality parsed: {0}", result.Quality);
result.ReleaseGroup = ParseReleaseGroup(title); result.ReleaseGroup = ParseReleaseGroup(title);
Logger.Trace("Release Group parsed: {0}", result.ReleaseGroup); Logger.Debug("Release Group parsed: {0}", result.ReleaseGroup);
return result; return result;
} }
} }
catch (InvalidDateException ex) catch (InvalidDateException ex)
{ {
Logger.TraceException(ex.Message, ex); Logger.DebugException(ex.Message, ex);
break; break;
} }
} }
@ -191,13 +190,13 @@ namespace NzbDrone.Core.Parser
Logger.ErrorException("An error has occurred while trying to parse " + title, e); Logger.ErrorException("An error has occurred while trying to parse " + title, e);
} }
Logger.Trace("Unable to parse {0}", title); Logger.Debug("Unable to parse {0}", title);
return null; return null;
} }
public static string ParseSeriesName(string title) public static string ParseSeriesName(string title)
{ {
Logger.Trace("Parsing string '{0}'", title); Logger.Debug("Parsing string '{0}'", title);
var parseResult = ParseTitle(title); var parseResult = ParseTitle(title);
@ -402,7 +401,7 @@ namespace NzbDrone.Core.Parser
result.SeriesTitle = CleanSeriesTitle(seriesName); result.SeriesTitle = CleanSeriesTitle(seriesName);
result.SeriesTitleInfo = GetSeriesTitleInfo(result.SeriesTitle); result.SeriesTitleInfo = GetSeriesTitleInfo(result.SeriesTitle);
Logger.Trace("Episode Parsed. {0}", result); Logger.Debug("Episode Parsed. {0}", result);
return result; return result;
} }
@ -492,7 +491,7 @@ namespace NzbDrone.Core.Parser
{ {
if (title.ToLower().Contains("password") && title.ToLower().Contains("yenc")) if (title.ToLower().Contains("password") && title.ToLower().Contains("yenc"))
{ {
Logger.Trace(""); Logger.Debug("");
return false; return false;
} }

View File

@ -66,7 +66,7 @@ namespace NzbDrone.Core.Parser
if (!episodes.Any()) if (!episodes.Any())
{ {
_logger.Trace("No matching episodes found for: {0}", parsedEpisodeInfo); _logger.Debug("No matching episodes found for: {0}", parsedEpisodeInfo);
return null; return null;
} }
@ -256,7 +256,7 @@ namespace NzbDrone.Core.Parser
if (series == null) if (series == null)
{ {
_logger.Trace("No matching series {0}", title); _logger.Debug("No matching series {0}", title);
return null; return null;
} }
@ -325,7 +325,7 @@ namespace NzbDrone.Core.Parser
if (series == null) if (series == null)
{ {
_logger.Trace("No matching series {0}", parsedEpisodeInfo.SeriesTitle); _logger.Debug("No matching series {0}", parsedEpisodeInfo.SeriesTitle);
return null; return null;
} }

View File

@ -28,7 +28,7 @@ namespace NzbDrone.Core.Parser
public static QualityModel ParseQuality(string name) public static QualityModel ParseQuality(string name)
{ {
Logger.Trace("Trying to parse quality for {0}", name); Logger.Debug("Trying to parse quality for {0}", name);
name = name.Trim(); name = name.Trim();
var normalizedName = name.CleanSeriesTitle(); var normalizedName = name.CleanSeriesTitle();

View File

@ -27,7 +27,7 @@ namespace NzbDrone.Core.Queue
if (downloadClient == null) if (downloadClient == null)
{ {
_logger.Trace("Download client is not configured."); _logger.Debug("Download client is not configured.");
return new List<Queue>(); return new List<Queue>();
} }

View File

@ -23,7 +23,7 @@ namespace NzbDrone.Core.Rest
Ensure.That(response.Request, () => response.Request).IsNotNull(); Ensure.That(response.Request, () => response.Request).IsNotNull();
Ensure.That(restClient, () => restClient).IsNotNull(); Ensure.That(restClient, () => restClient).IsNotNull();
Logger.Trace("Validating Responses from [{0}] [{1}] status: [{2}]", response.Request.Method, restClient.BuildUri(response.Request), response.StatusCode); Logger.Debug("Validating Responses from [{0}] [{1}] status: [{2}]", response.Request.Method, restClient.BuildUri(response.Request), response.StatusCode);
if (response.ResponseUri == null) if (response.ResponseUri == null)
{ {

View File

@ -191,7 +191,7 @@ namespace NzbDrone.Core.Tv
{ {
foreach (var episode in GetEpisodesByFileId(message.EpisodeFile.Id)) foreach (var episode in GetEpisodesByFileId(message.EpisodeFile.Id))
{ {
_logger.Trace("Detaching episode {0} from file.", episode.Id); _logger.Debug("Detaching episode {0} from file.", episode.Id);
episode.EpisodeFileId = 0; episode.EpisodeFileId = 0;
if (!message.ForUpgrade && _configService.AutoUnmonitorPreviouslyDownloadedEpisodes) if (!message.ForUpgrade && _configService.AutoUnmonitorPreviouslyDownloadedEpisodes)

View File

@ -4,7 +4,7 @@ using System.IO;
using System.Linq; using System.Linq;
using NLog; using NLog;
using NzbDrone.Core.DataAugmentation.DailySeries; using NzbDrone.Core.DataAugmentation.DailySeries;
using NzbDrone.Core.Instrumentation; using NzbDrone.Core.Instrumentation.Extensions;
using NzbDrone.Core.Messaging.Commands; using NzbDrone.Core.Messaging.Commands;
using NzbDrone.Core.Messaging.Events; using NzbDrone.Core.Messaging.Events;
using NzbDrone.Core.MetadataSource; using NzbDrone.Core.MetadataSource;
@ -88,7 +88,7 @@ namespace NzbDrone.Core.Tv
//Todo: Should this should use the previous season's monitored state? //Todo: Should this should use the previous season's monitored state?
if (existingSeason == null) if (existingSeason == null)
{ {
_logger.Trace("New season ({0}) for series: [{1}] {2}, setting monitored to true", season.SeasonNumber, series.TvdbId, series.Title); _logger.Debug("New season ({0}) for series: [{1}] {2}, setting monitored to true", season.SeasonNumber, series.TvdbId, series.Title);
season.Monitored = true; season.Monitored = true;
} }

View File

@ -141,10 +141,10 @@ namespace NzbDrone.Core.Tv
// series are usually the first thing in release title, so we select the leftmost and longest match // series are usually the first thing in release title, so we select the leftmost and longest match
var match = query.First().series; var match = query.First().series;
_logger.Trace("Multiple series matched {0} from title {1}", match.Title, title); _logger.Debug("Multiple series matched {0} from title {1}", match.Title, title);
foreach (var entry in list) foreach (var entry in list)
{ {
_logger.Trace("Multiple series match candidate: {0} cleantitle: {1}", entry.Title, entry.CleanTitle); _logger.Debug("Multiple series match candidate: {0} cleantitle: {1}", entry.Title, entry.CleanTitle);
} }
return match; return match;

View File

@ -5,9 +5,9 @@ using NzbDrone.Common;
using NzbDrone.Common.Disk; using NzbDrone.Common.Disk;
using NzbDrone.Common.EnvironmentInfo; using NzbDrone.Common.EnvironmentInfo;
using NzbDrone.Common.Processes; using NzbDrone.Common.Processes;
using NzbDrone.Core.Instrumentation.Extensions;
using NzbDrone.Core.Messaging.Commands; using NzbDrone.Core.Messaging.Commands;
using NzbDrone.Core.Update.Commands; using NzbDrone.Core.Update.Commands;
using NzbDrone.Core.Instrumentation;
namespace NzbDrone.Core.Update namespace NzbDrone.Core.Update
{ {

View File

@ -1,7 +1,7 @@
using NLog; using NLog;
using NzbDrone.Common.EnvironmentInfo; using NzbDrone.Common.EnvironmentInfo;
using NzbDrone.Core.Configuration; using NzbDrone.Core.Configuration;
using NzbDrone.Core.Instrumentation; using NzbDrone.Core.Instrumentation.Extensions;
namespace NzbDrone.Core.Update namespace NzbDrone.Core.Update
{ {

View File

@ -30,13 +30,13 @@ namespace NzbDrone.Host.AccessControl
{ {
if (!IsNzbDronePortOpen(_configFileProvider.Port)) if (!IsNzbDronePortOpen(_configFileProvider.Port))
{ {
_logger.Trace("Opening Port for NzbDrone: {0}", _configFileProvider.Port); _logger.Debug("Opening Port for NzbDrone: {0}", _configFileProvider.Port);
OpenFirewallPort(_configFileProvider.Port); OpenFirewallPort(_configFileProvider.Port);
} }
if (_configFileProvider.EnableSsl && !IsNzbDronePortOpen(_configFileProvider.SslPort)) if (_configFileProvider.EnableSsl && !IsNzbDronePortOpen(_configFileProvider.SslPort))
{ {
_logger.Trace("Opening SSL Port for NzbDrone: {0}", _configFileProvider.SslPort); _logger.Debug("Opening SSL Port for NzbDrone: {0}", _configFileProvider.SslPort);
OpenFirewallPort(_configFileProvider.SslPort); OpenFirewallPort(_configFileProvider.SslPort);
} }
} }

Some files were not shown because too many files have changed in this diff Show More