The docappender is rejecting -2 as a value for CompressionLevel despite it being a valid value for gzip compression in the standard library.
The validation logic should be updated to accept -2:
|
if cfg.CompressionLevel < -1 || cfg.CompressionLevel > 9 { |