diff options
author | Francis Lavoie <[email protected]> | 2022-02-19 17:12:28 -0500 |
---|---|---|
committer | GitHub <[email protected]> | 2022-02-19 15:12:28 -0700 |
commit | c921e08296ee379da3689caa1371a3003a512648 (patch) | |
tree | 66dd89cfdc122c5ee4d01078e9fe1d374e81585d /modules/logging | |
parent | ddbb234d91246396b52d9de51f112ac2f5388829 (diff) | |
download | caddy-c921e08296ee379da3689caa1371a3003a512648.tar.gz caddy-c921e08296ee379da3689caa1371a3003a512648.zip |
logging: Add `roll_local_time` Caddyfile option (#4583)
Diffstat (limited to 'modules/logging')
-rw-r--r-- | modules/logging/filewriter.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/modules/logging/filewriter.go b/modules/logging/filewriter.go index 7333fb20e..c0b5715d9 100644 --- a/modules/logging/filewriter.go +++ b/modules/logging/filewriter.go @@ -135,6 +135,7 @@ func (fw FileWriter) OpenWriter() (io.WriteCloser, error) { // roll_disabled // roll_size <size> // roll_uncompressed +// roll_local_time // roll_keep <num> // roll_keep_for <days> // } @@ -188,6 +189,12 @@ func (fw *FileWriter) UnmarshalCaddyfile(d *caddyfile.Dispenser) error { return d.ArgErr() } + case "roll_local_time": + fw.RollLocalTime = true + if d.NextArg() { + return d.ArgErr() + } + case "roll_keep": var keepStr string if !d.AllArgs(&keepStr) { |