diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2017-02-22 19:44:51 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-22 19:44:51 +0800 |
commit | d6748284bd6b4424d0e50cb4b952d12c74203960 (patch) | |
tree | 4adc337cdafd4a55a1eb7f0de7271a226d854407 /modules/setting | |
parent | 01d957677f160e4b5e43ce043b05e246493b34ea (diff) | |
download | gitea-d6748284bd6b4424d0e50cb4b952d12c74203960.tar.gz gitea-d6748284bd6b4424d0e50cb4b952d12c74203960.zip |
fix panic when push but the only log mode console is disabled by serv and update commands (#1007)
Diffstat (limited to 'modules/setting')
-rw-r--r-- | modules/setting/setting.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/setting/setting.go b/modules/setting/setting.go index fbb283a9da..dd06691dc3 100644 --- a/modules/setting/setting.go +++ b/modules/setting/setting.go @@ -1096,6 +1096,10 @@ func NewXORMLogService(disableConsole bool) { } log.XORMLogger.SetLevel(lvl) } + + if len(logConfigs) == 0 { + log.DiscardXORMLogger() + } } func newCacheService() { |