diff options
author | Matthew Holt <[email protected]> | 2020-03-24 08:20:43 -0600 |
---|---|---|
committer | Matthew Holt <[email protected]> | 2020-03-24 08:20:49 -0600 |
commit | 9af05719bc99e36001d86c1f9af7015d856334b0 (patch) | |
tree | 241947f8faf1b869155186c70b1a2236dedcb6d6 | |
parent | d08cbefff8377c5011c3fc7fb7bc576ac9f56be2 (diff) | |
download | caddy-9af05719bc99e36001d86c1f9af7015d856334b0.tar.gz caddy-9af05719bc99e36001d86c1f9af7015d856334b0.zip |
logging: Fix off-by-one for roll size MB from Caddyfile
"10mb" now results in 10, rather than 9.
-rw-r--r-- | modules/logging/filewriter.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/logging/filewriter.go b/modules/logging/filewriter.go index e9c2dd8d0..4d306180f 100644 --- a/modules/logging/filewriter.go +++ b/modules/logging/filewriter.go @@ -168,7 +168,7 @@ func (fw *FileWriter) UnmarshalCaddyfile(d *caddyfile.Dispenser) error { if err != nil { return d.Errf("parsing size: %v", err) } - fw.RollSizeMB = int(size) / 1024 / 1024 + fw.RollSizeMB = int(size)/1024/1024 + 1 case "roll_keep": var keepStr string |