Severity: Warning
File: src/Servy.Core/IO/RotatingStreamWriter.cs, lines 363–366
Description:
When rotation limit deletion fails (e.g., antivirus lock, file in use), the exception is swallowed silently. The file is not deleted and no counter tracks skipped deletions. Over time, the rotated file count can grow unboundedly, potentially filling disk.
The Rotate() method has a circuit-breaker pattern for failures, but EnforceMaxRotations does not.
Suggested fix:
Log a warning when deletion fails (consistent with the logging approach in Rotate()), and consider tracking consecutive failures to alert operators.
Severity: Warning
File:
src/Servy.Core/IO/RotatingStreamWriter.cs, lines 363–366Description:
When rotation limit deletion fails (e.g., antivirus lock, file in use), the exception is swallowed silently. The file is not deleted and no counter tracks skipped deletions. Over time, the rotated file count can grow unboundedly, potentially filling disk.
The
Rotate()method has a circuit-breaker pattern for failures, butEnforceMaxRotationsdoes not.Suggested fix:
Log a warning when deletion fails (consistent with the logging approach in
Rotate()), and consider tracking consecutive failures to alert operators.