1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-05 10:32:35 +01:00

Updated some log levels

This commit is contained in:
kay.one 2011-06-21 23:34:33 -07:00
parent 56fdf1a040
commit 13732a3f2e
4 changed files with 16 additions and 16 deletions

View File

@ -110,13 +110,13 @@ public virtual EpisodeFile ImportFile(Series series, string filePath)
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 @@ public virtual EpisodeFile ImportFile(Series series, string filePath)
{
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 @@ public virtual bool MoveEpisodeFile(EpisodeFile episodeFile)
_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 @@ private List<string> GetVideoFiles(string path)
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;
}
}

View File

@ -53,12 +53,12 @@ public virtual void SaveSettings(JobSetting settings)
{
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 @@ public virtual bool RunScheduled()
_isRunning = false;
}
Logger.Debug("Finished executing scheduled tasks.");
Logger.Trace("Finished executing scheduled tasks.");
return true;
}
@ -124,7 +124,7 @@ public virtual bool QueueJob(Type jobType, int targetId = 0)
}
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 @@ private void ProcessQueue()
}
else
{
Logger.Debug("Finished processing jobs in the queue.");
Logger.Trace("Finished processing jobs in the queue.");
}
return;

View File

@ -97,7 +97,7 @@ public virtual FileInfo CalculateFilePath(Series series, int seasonNumber, strin
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 @@ LEFT OUTER JOIN EpisodeFiles
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 @@ LEFT OUTER JOIN EpisodeFiles
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 @@ LEFT OUTER JOIN Episodes
if (updated > 0)
{
Logger.Warn("Removed {0} orphaned files.", updated);
Logger.Debug("Removed {0} orphaned files.", updated);
}
return updated;
@ -186,7 +186,7 @@ public virtual string GetNewFilename(IList<Episode> episodes, string seriesTitle
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());
}

View File

@ -72,7 +72,7 @@ internal static Process StartServer()
IISProcess.BeginOutputReadLine();
//Start Ping
_pingTimer = new Timer(30000) { AutoReset = true };
_pingTimer = new Timer(300000) { AutoReset = true };
_pingTimer.Elapsed += (PingServer);
_pingTimer.Start();