summaryrefslogtreecommitdiff
path: root/modules/logging
diff options
context:
space:
mode:
authorMatthew Holt <mholt@users.noreply.github.com>2020-03-24 08:20:43 -0600
committerMatthew Holt <mholt@users.noreply.github.com>2020-03-24 08:20:49 -0600
commit9af05719bc99e36001d86c1f9af7015d856334b0 (patch)
tree241947f8faf1b869155186c70b1a2236dedcb6d6 /modules/logging
parentd08cbefff8377c5011c3fc7fb7bc576ac9f56be2 (diff)
logging: Fix off-by-one for roll size MB from Caddyfile
"10mb" now results in 10, rather than 9.
Diffstat (limited to 'modules/logging')
-rw-r--r--modules/logging/filewriter.go2
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