open-consul/logger
Hans Hasselberg 1bf94b01e2
log: handle discard all logfiles properly (#6945)
* Handle discard all logfiles properly

Fixes https://github.com/hashicorp/consul/issues/6892.

The [docs](https://www.consul.io/docs/agent/options.html#_log_rotate_max_files) are stating:

> -log-rotate-max-files - to specify the maximum number of older log
> file archives to keep. Defaults to 0 (no files are ever deleted). Set to
> -1 to disable rotation and discard all log files.

But the `-1` case was not implemented and led to a panic when being
used.

Co-Authored-By: Freddy <freddygv@users.noreply.github.com>
2019-12-18 22:31:22 +01:00
..
gated_writer.go Moves logger setup into its own package. (#2471) 2016-11-03 21:14:56 -07:00
gated_writer_test.go Moves logger setup into its own package. (#2471) 2016-11-03 21:14:56 -07:00
grpc.go Connect Envoy Command (#4735) 2018-10-10 16:55:34 +01:00
grpc_test.go Connect Envoy Command (#4735) 2018-10-10 16:55:34 +01:00
log_levels.go Moves logger setup into its own package. (#2471) 2016-11-03 21:14:56 -07:00
log_writer.go golint: Drop the unused value from range 2017-04-25 09:26:13 -07:00
log_writer_test.go Moves logger setup into its own package. (#2471) 2016-11-03 21:14:56 -07:00
logfile.go log: handle discard all logfiles properly (#6945) 2019-12-18 22:31:22 +01:00
logfile_test.go log: handle discard all logfiles properly (#6945) 2019-12-18 22:31:22 +01:00
logger.go log rotation: limit count of rotated log files (#5831) 2019-07-19 15:36:34 -06:00
syslog.go Moves logger setup into its own package. (#2471) 2016-11-03 21:14:56 -07:00
syslog_test.go Moves logger setup into its own package. (#2471) 2016-11-03 21:14:56 -07:00