From a51b1e8951960e2040d51c2ad49f1985f51fb25a Mon Sep 17 00:00:00 2001 From: Furtchet Date: Mon, 6 Nov 2017 08:01:31 -0600 Subject: [PATCH] Update the config key to database_log_queries so it is more descriptive, as suggested in #9785. --- conf/defaults.ini | 2 +- conf/sample.ini | 2 +- docs/sources/installation/configuration.md | 2 +- pkg/services/sqlstore/sqlstore.go | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/conf/defaults.ini b/conf/defaults.ini index 51c549bf070..a4c87356a55 100644 --- a/conf/defaults.ini +++ b/conf/defaults.ini @@ -83,7 +83,7 @@ max_idle_conn = 2 max_open_conn = # Set to true to log the sql calls and execution times. -debug = +log_queries = # For "postgres", use either "disable", "require" or "verify-full" # For "mysql", use either "true", "false", or "skip-verify". diff --git a/conf/sample.ini b/conf/sample.ini index ec01b7c7979..6c522cffacc 100644 --- a/conf/sample.ini +++ b/conf/sample.ini @@ -92,7 +92,7 @@ ;max_open_conn = # Set to true to log the sql calls and execution times. -debug = +log_queries = #################################### Session #################################### [session] diff --git a/docs/sources/installation/configuration.md b/docs/sources/installation/configuration.md index 12c9d121490..24ddca9160f 100644 --- a/docs/sources/installation/configuration.md +++ b/docs/sources/installation/configuration.md @@ -224,7 +224,7 @@ The maximum number of connections in the idle connection pool. ### max_open_conn The maximum number of open connections to the database. -### debug +### log_queries Set to `true` to log the sql calls and execution times.
diff --git a/pkg/services/sqlstore/sqlstore.go b/pkg/services/sqlstore/sqlstore.go index bd27e8b8871..f37499bd60f 100644 --- a/pkg/services/sqlstore/sqlstore.go +++ b/pkg/services/sqlstore/sqlstore.go @@ -158,7 +158,7 @@ func getEngine() (*xorm.Engine, error) { } else { engine.SetMaxOpenConns(DbCfg.MaxOpenConn) engine.SetMaxIdleConns(DbCfg.MaxIdleConn) - debugSql := setting.Cfg.Section("database").Key("debug").MustBool(false) + debugSql := setting.Cfg.Section("database").Key("log_queries").MustBool(false) if !debugSql { engine.SetLogger(&xorm.DiscardLogger{}) } else {