From 61712c5c0a63ca1e19776e5661fea189fb38523a Mon Sep 17 00:00:00 2001 From: Matt Ouille Date: Thu, 21 Mar 2024 16:25:58 -0700 Subject: [PATCH] Rework logging defaults --- pkg/log/format.go | 6 +++--- pkg/log/log.go | 2 -- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/pkg/log/format.go b/pkg/log/format.go index bbddce44e..4db34ae19 100644 --- a/pkg/log/format.go +++ b/pkg/log/format.go @@ -65,9 +65,9 @@ func sortFields(data logrus.Fields) []string { } func parseFormat(format string) logrus.Formatter { - if format == "plain" { - return &logrus.TextFormatter{} + if format == "json" { + return &logrus.JSONFormatter{} } - return &logrus.JSONFormatter{} + return getDevFormatter() } diff --git a/pkg/log/log.go b/pkg/log/log.go index d70d4bfcc..8013d4b74 100644 --- a/pkg/log/log.go +++ b/pkg/log/log.go @@ -19,8 +19,6 @@ func New(cloudProvider string, level logrus.Level, format string) *Logger { switch cloudProvider { case "GCP": l.Formatter = getGCPFormatter() - case "none": - l.Formatter = getDevFormatter() default: l.Formatter = parseFormat(format) }