From dd3793f4a7b2a676550b9a935ddd23e5d5a00e72 Mon Sep 17 00:00:00 2001 From: dosco <832235+dosco@users.noreply.github.com> Date: Wed, 22 May 2024 00:44:17 -0700 Subject: [PATCH] fix: renamed log_sql_vars to log_vars --- core/config.go | 2 +- serv/http.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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 {