1
0
Fork 0
mirror of https://github.com/eosswedenorg/thalos synced 2026-06-18 04:40:03 +02:00

app/log/config.go: add mapstructure tags

This commit is contained in:
Henrik Hautakoski 2024-02-17 16:31:14 +01:00
parent 106e88f2f4
commit b517943fee

View file

@ -10,16 +10,16 @@ import (
// Config represents configuration parameters for a log.
type Config struct {
// Filename where the log is stored.
Filename string `yaml:"filename"`
Filename string `yaml:"filename" mapstructure:"filename"`
// Directory where the log files are stored.
Directory string `yaml:"directory"`
Directory string `yaml:"directory" mapstructure:"directory"`
// Maximum filesize, the log is rotated when this size is exceeded.
MaxFileSize types.Size `yaml:"maxfilesize"`
MaxFileSize types.Size `yaml:"maxfilesize" mapstructure:"maxfilesize"`
// Maximum lifetime of the file before it is rotated.
MaxTime time.Duration `yaml:"maxtime"`
MaxTime time.Duration `yaml:"maxtime" mapstructure:"maxtime"`
}
func (c Config) GetFilename() string {