1
0
mirror of https://github.com/drakkan/sftpgo.git synced 2025-11-23 22:04:50 +02:00

improve more logs

This commit is contained in:
Nicola Murino
2019-09-05 23:42:00 +02:00
parent 25260297aa
commit a26343a694
9 changed files with 48 additions and 48 deletions

View File

@@ -26,13 +26,13 @@ func initializeMySQLProvider() error {
dbHandle, err := sql.Open("mysql", connectionString)
if err == nil {
numCPU := runtime.NumCPU()
logger.Debug(logSender, "", "mysql database handle created, connection string: '%v', pool size: %v", connectionString, numCPU)
logger.Debug(logSender, "", "mysql database handle created, connection string: %#v, pool size: %v", connectionString, numCPU)
dbHandle.SetMaxIdleConns(numCPU)
dbHandle.SetMaxOpenConns(numCPU)
dbHandle.SetConnMaxLifetime(1800 * time.Second)
provider = MySQLProvider{dbHandle: dbHandle}
} else {
logger.Warn(logSender, "", "error creating mysql database handler, connection string: '%v', error: %v", connectionString, err)
logger.Warn(logSender, "", "error creating mysql database handler, connection string: %#v, error: %v", connectionString, err)
}
return err
}