aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2018-03-30 22:49:46 +0800
committerGitHub <noreply@github.com>2018-03-30 22:49:46 +0800
commitd877bf7e15ebd5d9a74e58f3999e3276e76fa15e (patch)
tree5534d0ff2a65ae1d17318476e1aae164eb2739ec /modules
parent45d1fc03cb043b585c81d15163184be7691f5fc8 (diff)
downloadgitea-d877bf7e15ebd5d9a74e58f3999e3276e76fa15e.tar.gz
gitea-d877bf7e15ebd5d9a74e58f3999e3276e76fa15e.zip
Add config option to enable or disable log executed SQL (#3726)
* add config option to enable or disable log executed SQL * rename ShowSQL to LogSQL
Diffstat (limited to 'modules')
-rw-r--r--modules/setting/setting.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/setting/setting.go b/modules/setting/setting.go
index 9ef175d20e..9ba3e5a666 100644
--- a/modules/setting/setting.go
+++ b/modules/setting/setting.go
@@ -159,6 +159,7 @@ var (
UseMSSQL bool
UsePostgreSQL bool
UseTiDB bool
+ LogSQL bool
// Indexer settings
Indexer struct {
@@ -931,6 +932,7 @@ func NewContext() {
}
}
IterateBufferSize = Cfg.Section("database").Key("ITERATE_BUFFER_SIZE").MustInt(50)
+ LogSQL = Cfg.Section("database").Key("LOG_SQL").MustBool(true)
sec = Cfg.Section("attachment")
AttachmentPath = sec.Key("PATH").MustString(path.Join(AppDataPath, "attachments"))