Skip to content

Commit

Permalink
Set default log level in config to 'warn' (flyteorg#127)
Browse files Browse the repository at this point in the history
* updates

Signed-off-by: Katrina Rogan <[email protected]>

* fix unit test

Signed-off-by: Katrina Rogan <[email protected]>
  • Loading branch information
katrogan authored Apr 8, 2022
1 parent d0a5767 commit 1fc128f
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
2 changes: 0 additions & 2 deletions database/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"time"

"github.com/flyteorg/flytestdlib/config"
"gorm.io/gorm/logger"
)

const (
Expand Down Expand Up @@ -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"`
}
Expand Down
2 changes: 1 addition & 1 deletion logger/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion profutils/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
},
Expand Down

0 comments on commit 1fc128f

Please sign in to comment.