aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeil Alexander <neilalexander@users.noreply.github.com>2021-07-20 10:49:12 +0100
committerNeil Alexander <neilalexander@users.noreply.github.com>2021-07-20 10:49:12 +0100
commit0ff078ebd706600f69a6491538e97abec6e0606f (patch)
treeb2ec2f5ed016ad1abde39a5183f439b73391949c
parentda2023ba0405bfed197f7e1cdd080380ef60c9f0 (diff)
Fixed log printing bug (closes #1885)
Signed-off-by: Kilos kilosliu@workly.ai>
-rw-r--r--internal/sqlutil/trace.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/internal/sqlutil/trace.go b/internal/sqlutil/trace.go
index ad004455..5138aa59 100644
--- a/internal/sqlutil/trace.go
+++ b/internal/sqlutil/trace.go
@@ -125,9 +125,9 @@ func Open(dbProperties *config.DatabaseOptions) (*sql.DB, error) {
}
if driverName != SQLiteDriverName() {
logrus.WithFields(logrus.Fields{
- "MaxOpenConns": dbProperties.MaxOpenConns,
- "MaxIdleConns": dbProperties.MaxIdleConns,
- "ConnMaxLifetime": dbProperties.ConnMaxLifetime,
+ "MaxOpenConns": dbProperties.MaxOpenConns(),
+ "MaxIdleConns": dbProperties.MaxIdleConns(),
+ "ConnMaxLifetime": dbProperties.ConnMaxLifetime(),
"dataSourceName": regexp.MustCompile(`://[^@]*@`).ReplaceAllLiteralString(dsn, "://"),
}).Debug("Setting DB connection limits")
db.SetMaxOpenConns(dbProperties.MaxOpenConns())