my-log/config/types.go

36 lines
687 B
Go
Raw Permalink Normal View History

package config
type Config struct {
2024-03-07 21:19:45 -06:00
Input Input
Outputs Outputs `toml:"output"`
Formatters Formatters
}
type Input struct {
Path string `env:"LOG_PATH"`
Recurse bool `env:"LOG_RECURSE"`
Ext string `env:"LOG_EXT"`
DotFolder bool `env:"LOG_DOT_FOLDER"`
}
2024-02-09 09:44:35 -06:00
type Outputs map[string]Output
type Output struct {
Enabled bool
Config map[string]any
}
2024-02-09 09:44:35 -06:00
type Stdout struct {
Format string `env:"LOG_STDOUT_FORMAT" mapstructure:"format"`
}
type stdoutEnabled struct {
Enabled bool `env:"LOG_STDOUT_ENABLED"`
2024-02-09 09:44:35 -06:00
}
2024-03-07 21:19:45 -06:00
type Formatters map[string]map[string]any
type JsonFormat struct {
PrettyPrint bool `env:"LOG_JSON_PRETTY_PRINT" mapstructure:"pretty_print"`
}