1
Fork 0
mirror of https://github.com/caddyserver/caddy.git synced 2024-12-16 21:56:40 -05:00
caddy/modules/logging
Jeremy Lin bf8c3c25c1
log: improve rounding logic for log rolling directives (#3367)
* For `roll_size` and `roll_keep_for` directives, round up instead of down.
  For example, if a user wants to be able to look back on 36 hours of logs,
  but you must round to a 24-hour multiple, then it's better to round up to
  48 hours (which includes the desired 36 hours) instead of down to 24 hours.

* `roll_size` had an off-by-one error that caused the size to be as much as
  1 MB larger than requested. For example, requests of `1MB` and `1.1MB`
  both became 2 MB. Now `1MB` means 1 MB, and `1.1MB` is rounded up to 2 MB.
2020-05-07 13:06:00 -06:00
..
encoders.go v2: 'log' directive for Caddyfile, and debug mode (#3052) 2020-02-25 22:00:33 -07:00
filewriter.go log: improve rounding logic for log rolling directives (#3367) 2020-05-07 13:06:00 -06:00
filterencoder.go logging: Add doc about which fields can't be filtered 2020-01-03 15:28:05 -07:00
filters.go v2: Module documentation; refactor LoadModule(); new caddy struct tags (#2924) 2019-12-10 13:36:46 -07:00
netwriter.go core: Rename ParsedAddress -> NetworkAddress 2020-04-07 08:33:45 -06:00
nopencoder.go v2: Logging! (#2831) 2019-10-28 14:39:37 -06:00