Improved some log messages

pull/1689/head
Qstick 4 years ago
parent c0fede5697
commit ac1c902013

@ -29,7 +29,7 @@ namespace NzbDrone.Core.DecisionEngine.Specifications
if (subject.Release.Size == 0) if (subject.Release.Size == 0)
{ {
_logger.Debug("Release has unknown size, skipping size check."); _logger.Debug("Release has unknown size, skipping size check");
return Decision.Accept(); return Decision.Accept();
} }
@ -55,7 +55,7 @@ namespace NzbDrone.Core.DecisionEngine.Specifications
if (!qualityDefinition.MaxSize.HasValue || qualityDefinition.MaxSize.Value == 0) if (!qualityDefinition.MaxSize.HasValue || qualityDefinition.MaxSize.Value == 0)
{ {
_logger.Debug("Max size is unlimited - skipping check."); _logger.Debug("Max size is unlimited, skipping size check");
} }
else else
{ {
@ -70,12 +70,12 @@ namespace NzbDrone.Core.DecisionEngine.Specifications
{ {
var runtimeMessage = $"{maxReleaseDuration}sec"; var runtimeMessage = $"{maxReleaseDuration}sec";
_logger.Debug("Item: {0}, Size: {1} is greater than maximum allowed size ({2} bytes for {3}), rejecting.", subject, subject.Release.Size, maxSize, runtimeMessage); _logger.Debug("Item: {0}, Size: {1} is greater than maximum allowed size ({2} bytes for {3}), rejecting", subject, subject.Release.Size, maxSize, runtimeMessage);
return Decision.Reject("{0} is larger than maximum allowed {1}", subject.Release.Size.SizeSuffix(), maxSize.SizeSuffix()); return Decision.Reject("{0} is larger than maximum allowed {1}", subject.Release.Size.SizeSuffix(), maxSize.SizeSuffix());
} }
} }
_logger.Debug("Item: {0}, meets size constraints.", subject); _logger.Debug("Item: {0}, meets size constraints", subject);
return Decision.Accept(); return Decision.Accept();
} }
} }

Loading…
Cancel
Save