log: define OutputFormat type

Strong-type the format.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2023-07-16 22:32:38 +02:00
parent 778ac302b2
commit dd67240f1b
2 changed files with 7 additions and 4 deletions

View File

@@ -357,7 +357,7 @@ func setLogLevel(context *cli.Context, config *srvconfig.Config) error {
}
func setLogFormat(config *srvconfig.Config) error {
f := config.Debug.Format
f := log.OutputFormat(config.Debug.Format)
if f == "" {
f = log.TextFormat
}