✨ Separate formatters in config
This commit is contained in:
parent
99f6dc3f8c
commit
da3b524925
6 changed files with 56 additions and 11 deletions
|
|
@ -1,8 +1,9 @@
|
|||
package config
|
||||
|
||||
type Config struct {
|
||||
Input Input
|
||||
Outputs Outputs `toml:"output"`
|
||||
Input Input
|
||||
Outputs Outputs `toml:"output"`
|
||||
Formatters Formatters
|
||||
}
|
||||
|
||||
type Input struct {
|
||||
|
|
@ -20,9 +21,15 @@ type Output struct {
|
|||
}
|
||||
|
||||
type Stdout struct {
|
||||
Json bool `env:"LOG_STDOUT_JSON" mapstructure:"json"`
|
||||
Formatter string `env:"LOG_STDOUT_FORMATTER" mapstructure:"formatter"`
|
||||
}
|
||||
|
||||
type stdoutEnabled struct {
|
||||
Enabled bool `env:"LOG_STDOUT_ENABLED"`
|
||||
}
|
||||
|
||||
type Formatters map[string]map[string]any
|
||||
|
||||
type JsonFormat struct {
|
||||
PrettyPrint bool `env:"LOG_JSON_PRETTY_PRINT" mapstructure:"pretty_print"`
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue