diff --git a/main.go b/main.go index 2758f29..66124c7 100644 --- a/main.go +++ b/main.go @@ -68,6 +68,12 @@ func configureLog() { } log.SetLevel(ll) + + if *logFormat == "text" { + log.SetFormatter(&log.TextFormatter{}) + } else { + log.SetFormatter(&log.JSONFormatter{}) + } } func loadConfig() (*config.Config, error) {