Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS
Mirrored from https://github.com/Slazee/caddy.git
Synced Nov 14, 05:15 UTC
logging: Fix off-by-one for roll size MB from Caddyfile
"10mb" now results in 10, rather than 9.
Matthew Holt committed
Mar 24, 2020 at 08:20 UTC
9af05719bc99e36001d86c1f9af7015d856334b0
1 file changed
+1
-1
modules/logging/filewriter.go
+1
-1
@@ -168,7 +168,7 @@ func (fw *FileWriter) UnmarshalCaddyfile(d *caddyfile.Dispenser) error {
168
if err != nil {
169
return d.Errf("parsing size: %v", err)
170
}
171
- fw.RollSizeMB = int(size) / 1024 / 1024
171
+ fw.RollSizeMB = int(size)/1024/1024 + 1
172
173
case "roll_keep":
174
var keepStr string