Skip to content

Commit

Permalink
misc: change some log points to warning
Browse files Browse the repository at this point in the history
level instead of error level.
  • Loading branch information
revam committed Oct 23, 2023
1 parent 778f5f5 commit 60a5ee9
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -135,14 +135,14 @@ protected override void Process()
Logger.LogDebug("Image already in cache; {FilePath} from {DownloadUrl}", req.FilePath, req.DownloadUrl);
break;
case ImageDownloadResult.Failure:
Logger.LogError("Image failed to download; {FilePath} from {DownloadUrl}", req.FilePath, req.DownloadUrl);
Logger.LogWarning("Image failed to download; {FilePath} from {DownloadUrl}", req.FilePath, req.DownloadUrl);
break;
case ImageDownloadResult.RemovedResource:
Logger.LogWarning("Image failed to download and the local entry has been removed; {FilePath} from {DownloadUrl}", req.FilePath,
req.DownloadUrl);
break;
case ImageDownloadResult.InvalidResource:
Logger.LogError("Image failed to download and the local entry could not be removed; {FilePath} from {DownloadUrl}", req.FilePath,
Logger.LogWarning("Image failed to download and the local entry could not be removed; {FilePath} from {DownloadUrl}", req.FilePath,
req.DownloadUrl);
break;
}
Expand Down
4 changes: 2 additions & 2 deletions Shoko.Server/Commands/Import/CommandRequest_DownloadImage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -200,14 +200,14 @@ protected override void Process()
Logger.LogDebug("Image already in cache; {FilePath} from {DownloadUrl}", req.FilePath, req.DownloadUrl);
break;
case ImageDownloadResult.Failure:
Logger.LogError("Image failed to download; {FilePath} from {DownloadUrl}", req.FilePath, req.DownloadUrl);
Logger.LogWarning("Image failed to download; {FilePath} from {DownloadUrl}", req.FilePath, req.DownloadUrl);
break;
case ImageDownloadResult.RemovedResource:
Logger.LogWarning("Image failed to download and the local entry has been removed; {FilePath} from {DownloadUrl}", req.FilePath,
req.DownloadUrl);
break;
case ImageDownloadResult.InvalidResource:
Logger.LogError("Image failed to download and the local entry could not be removed; {FilePath} from {DownloadUrl}", req.FilePath,
Logger.LogWarning("Image failed to download and the local entry could not be removed; {FilePath} from {DownloadUrl}", req.FilePath,
req.DownloadUrl);
break;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ protected override void Process()
var place = vlocal?.GetBestVideoLocalPlace(true);
if (place == null)
{
Logger.LogError("Could not find Video: {VideoLocalID}", VideoLocalID);
Logger.LogWarning("Could not find Video: {VideoLocalID}", VideoLocalID);
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ private void _recoveringTimerElapsed(object state)
{
if (!Directory.Exists(_path))
{
_logger.LogError("Unable to find {Path}. Retrying in {Time}s", _path, _directoryFailedRetryInterval.TotalSeconds);
_logger.LogWarning("Unable to find {Path}. Retrying in {Time}s", _path, _directoryFailedRetryInterval.TotalSeconds);
if (_watcher != null)
_watcher.EnableRaisingEvents = false;
_recoveringTimer?.Change(_directoryFailedRetryInterval, Timeout.InfiniteTimeSpan);
Expand Down Expand Up @@ -305,7 +305,7 @@ private bool IsLocked(string path)

if (numAttempts >= 60)
{
_logger.LogError("Could not access file: {Filename}", path);
_logger.LogWarning("Could not access file: {Filename}", path);
return true;
}

Expand Down Expand Up @@ -341,7 +341,7 @@ private bool IsLocked(string path)

if (numAttempts < 60 && filesize != 0) return false;

_logger.LogError("Could not access file: {Filename}", path);
_logger.LogWarning("Could not access file: {Filename}", path);
return true;
}

Expand Down

0 comments on commit 60a5ee9

Please sign in to comment.