Fixed log printing bug (closes #1885)

Signed-off-by: Kilos kilosliu@workly.ai>
main
Neil Alexander 2021-07-20 10:49:12 +01:00
parent da2023ba04
commit 0ff078ebd7
No known key found for this signature in database
GPG Key ID: A02A2019A2BB0944
1 changed files with 3 additions and 3 deletions

View File

@ -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())