Add support for remaining file rotation options (#5944)

This commit is contained in:
Daniel Nelson
2019-06-03 17:38:21 -07:00
committed by GitHub
parent 4197426a73
commit 6c3534a66e
3 changed files with 40 additions and 31 deletions

View File

@@ -149,12 +149,12 @@ type AgentConfig struct {
// Log file name, the empty string means to log to stderr.
Logfile string `toml:"logfile"`
// The logfile will be rotated when it becomes larger than the specified
// size. When set to 0 no size based rotation is performed.
// The file will be rotated after the time interval specified. When set
// to 0 no time based rotation is performed.
LogfileRotationInterval internal.Duration `toml:"logfile_rotation_interval"`
// Maximum number of rotated archives to keep, any older logs are deleted.
// If set to -1, no archives are removed.
// The logfile will be rotated when it becomes larger than the specified
// size. When set to 0 no size based rotation is performed.
LogfileRotationMaxSize internal.Size `toml:"logfile_rotation_max_size"`
// Maximum number of rotated archives to keep, any older logs are deleted.