{"record":{"id":"c59aa4e54043df09","repo":"caddyserver/caddy","slug":"invalid-roll-compression-s","errorCode":null,"errorMessage":"invalid roll_compression: %s","messagePattern":"invalid roll_compression: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"modules/logging/filewriter.go","lineNumber":273,"sourceCode":"\t\tcompress := true\n\t\tfw.RollCompress = &compress\n\t}\n\tif fw.RollKeep == 0 {\n\t\tfw.RollKeep = 10\n\t}\n\tif fw.RollKeepDays == 0 {\n\t\tfw.RollKeepDays = 90\n\t}\n\n\t// Determine compression algorithm to use. Priority:\n\t// 1) explicit RollCompression (none|gzip|zstd)\n\t// 2) if RollCompress is unset or true -> gzip\n\t// 3) if RollCompress is false -> none\n\tvar compression string\n\tif fw.RollCompression != \"\" {\n\t\tcompression = strings.ToLower(strings.TrimSpace(fw.RollCompression))\n\t\tif compression != \"none\" && compression != \"gzip\" && compression != \"zstd\" {\n\t\t\treturn nil, fmt.Errorf(\"invalid roll_compression: %s\", fw.RollCompression)\n\t\t}\n\t} else {\n\t\tif fw.RollCompress == nil || *fw.RollCompress {\n\t\t\tcompression = \"gzip\"\n\t\t} else {\n\t\t\tcompression = \"none\"\n\t\t}\n\t}\n\n\treturn &timberjack.Logger{\n\t\tFilename:         fw.Filename,\n\t\tMaxSize:          fw.RollSizeMB,\n\t\tMaxAge:           fw.RollKeepDays,\n\t\tMaxBackups:       fw.RollKeep,\n\t\tLocalTime:        fw.RollLocalTime,\n\t\tCompression:      compression,\n\t\tRotationInterval: time.Duration(fw.RollInterval),\n\t\tRotateAtMinutes:  fw.RollAtMinutes,","sourceCodeStart":255,"sourceCodeEnd":291,"githubUrl":"https://github.com/caddyserver/caddy/blob/50e54ee279aa1e504fe218ca49ab6ae16c100410/modules/logging/filewriter.go#L255-L291","documentation":"Error \"invalid roll_compression: %s\" thrown in caddyserver/caddy.","triggerScenarios":"Thrown at modules/logging/filewriter.go:273 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use a supported roll_compression value such as 'gzip' or 'zstd', or remove it for no compression."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"50e54ee279aa1e504fe218ca49ab6ae16c100410","analyzedAt":"2026-08-15T09:20:21.641Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}