1
0
Fork 0
forked from forgejo/forgejo

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
This commit is contained in:
Lunny Xiao 2018-03-30 22:49:46 +08:00 committed by GitHub
parent 45d1fc03cb
commit d877bf7e15
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 7 additions and 1 deletions

View file

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