Move sql query logging from info to debug

This commit is contained in:
Vikram Rangnekar 2019-11-22 01:32:09 -05:00
parent 8024a8420b
commit 7583326d21
3 changed files with 5 additions and 8 deletions

View File

@ -64,10 +64,9 @@ type config struct {
User string User string
Password string Password string
Schema string Schema string
PoolSize int32 `mapstructure:"pool_size"` PoolSize int32 `mapstructure:"pool_size"`
MaxRetries int `mapstructure:"max_retries"` MaxRetries int `mapstructure:"max_retries"`
LogLevel string `mapstructure:"log_level"` SetUserID bool `mapstructure:"set_user_id"`
SetUserID bool `mapstructure:"set_user_id"`
Vars map[string]string `mapstructure:"variables"` Vars map[string]string `mapstructure:"variables"`

View File

@ -28,9 +28,7 @@ func (pl *Logger) Log(ctx context.Context, level pgx.LogLevel, msg string, data
zlevel = zerolog.ErrorLevel zlevel = zerolog.ErrorLevel
case pgx.LogLevelWarn: case pgx.LogLevelWarn:
zlevel = zerolog.WarnLevel zlevel = zerolog.WarnLevel
case pgx.LogLevelInfo: case pgx.LogLevelDebug, pgx.LogLevelInfo:
zlevel = zerolog.InfoLevel
case pgx.LogLevelDebug:
zlevel = zerolog.DebugLevel zlevel = zerolog.DebugLevel
default: default:
zlevel = zerolog.DebugLevel zlevel = zerolog.DebugLevel

View File

@ -3,7 +3,7 @@ host_port: 0.0.0.0:8080
web_ui: true web_ui: true
# debug, info, warn, error, fatal, panic # debug, info, warn, error, fatal, panic
log_level: "warn" log_level: "info"
# When production mode is 'true' only queries # When production mode is 'true' only queries
# from the allow list are permitted. # from the allow list are permitted.