diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2018-03-30 22:49:46 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-30 22:49:46 +0800 |
commit | d877bf7e15ebd5d9a74e58f3999e3276e76fa15e (patch) | |
tree | 5534d0ff2a65ae1d17318476e1aae164eb2739ec /modules | |
parent | 45d1fc03cb043b585c81d15163184be7691f5fc8 (diff) | |
download | gitea-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.go | 2 |
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")) |