diff --git a/core/config.go b/core/config.go index 45f36d74..e84f0011 100644 --- a/core/config.go +++ b/core/config.go @@ -70,7 +70,7 @@ type Config struct { Debug bool `jsonschema:"title=Debug,default=false"` // Log SQL Query variable values - LogSQLVars bool `mapstructure:"log_sql_vars" json:"log_sql_vars" yaml:"log_sql_vars" jsonschema:"title=Log SQL Variables,default=false"` + LogVars bool `mapstructure:"log_vars" json:"log_vars" yaml:"log_vars" jsonschema:"title=Log Variables,default=false"` // Database polling duration (in seconds) used by subscriptions to // query for updates. diff --git a/serv/http.go b/serv/http.go index ad2d2d84..2cbab5ee 100644 --- a/serv/http.go +++ b/serv/http.go @@ -348,13 +348,13 @@ func (s *service) reqLog(res *core.Result, rc core.ReqConfig, resTimeMs int64, e fields = append(fields, zap.String("namespace", ns)) } - if res.Vars != nil && s.conf.Core.LogSQLVars { + if res.Vars != nil && s.conf.Core.LogVars { var vars map[string]interface{} err := json.Unmarshal(res.Vars, &vars) if err != nil { s.log.Error("failed to unmarshal sql vars", zap.Error(err)) } - fields = append(fields, zap.Any("sqlVars", vars)) + fields = append(fields, zap.Any("vars", vars)) } if sql != "" && s.logLevel >= logLevelDebug {