From 1fc128fcb8b67e96efc853ef903cac5362128170 Mon Sep 17 00:00:00 2001 From: Katrina Rogan Date: Fri, 8 Apr 2022 15:07:16 -0700 Subject: [PATCH] Set default log level in config to 'warn' (#127) * updates Signed-off-by: Katrina Rogan * fix unit test Signed-off-by: Katrina Rogan --- database/config.go | 2 -- logger/config.go | 2 +- profutils/server_test.go | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/database/config.go b/database/config.go index 4f34739aa6..536109597b 100644 --- a/database/config.go +++ b/database/config.go @@ -4,7 +4,6 @@ import ( "time" "github.com/flyteorg/flytestdlib/config" - "gorm.io/gorm/logger" ) const ( @@ -52,7 +51,6 @@ type DbConfig struct { MaxIdleConnections int `json:"maxIdleConnections" pflag:",maxIdleConnections sets the maximum number of connections in the idle connection pool."` MaxOpenConnections int `json:"maxOpenConnections" pflag:",maxOpenConnections sets the maximum number of open connections to the database."` ConnMaxLifeTime config.Duration `json:"connMaxLifeTime" pflag:",sets the maximum amount of time a connection may be reused"` - LogLevel logger.LogLevel `json:"log_level" pflag:"-,"` Postgres PostgresConfig `json:"postgres,omitempty"` SQLite SQLiteConfig `json:"sqlite,omitempty"` } diff --git a/logger/config.go b/logger/config.go index b600bcb2b9..ac8d59afea 100644 --- a/logger/config.go +++ b/logger/config.go @@ -27,7 +27,7 @@ var ( Formatter: FormatterConfig{ Type: FormatterJSON, }, - Level: InfoLevel, + Level: WarnLevel, } configSection = config.MustRegisterSectionWithUpdates(configSectionKey, defaultConfig, func(ctx context.Context, newValue config.Config) { diff --git a/profutils/server_test.go b/profutils/server_test.go index d55193524a..cfab64783b 100644 --- a/profutils/server_test.go +++ b/profutils/server_test.go @@ -73,7 +73,7 @@ func TestConfigHandler(t *testing.T) { "logger": map[string]interface{}{ "show-source": false, "mute": false, - "level": float64(4), + "level": float64(3), "formatter": map[string]interface{}{ "type": "json", },