Additional logging when on import decision

This commit is contained in:
Qstick 2017-10-08 00:55:14 -04:00
parent 828d70b0bd
commit 44e4e46b15
1 changed files with 42 additions and 29 deletions

View File

@ -114,6 +114,19 @@ namespace NzbDrone.Core.MediaFiles.TrackImport
decision = new ImportDecision(localTrack, new Rejection("Unexpected error processing file"));
}
if (decision == null)
{
_logger.Error("Unable to make a decision on {0}", file);
}
else if (decision.Rejections.Any())
{
_logger.Debug("File rejected for the following reasons: {0}", string.Join(", ", decision.Rejections));
}
else
{
_logger.Debug("File accepted");
}
return decision;
}