diff options
author | Matthew Holt <mholt@users.noreply.github.com> | 2020-03-24 08:20:43 -0600 |
---|---|---|
committer | Matthew Holt <mholt@users.noreply.github.com> | 2020-03-24 08:20:49 -0600 |
commit | 9af05719bc99e36001d86c1f9af7015d856334b0 (patch) | |
tree | 241947f8faf1b869155186c70b1a2236dedcb6d6 /modules | |
parent | d08cbefff8377c5011c3fc7fb7bc576ac9f56be2 (diff) |
logging: Fix off-by-one for roll size MB from Caddyfile
"10mb" now results in 10, rather than 9.
Diffstat (limited to 'modules')
-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 e9c2dd8..4d30618 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 |