diff options
Diffstat (limited to 'modules/setting')
-rw-r--r-- | modules/setting/log.go | 9 | ||||
-rw-r--r-- | modules/setting/setting.go | 6 |
2 files changed, 10 insertions, 5 deletions
diff --git a/modules/setting/log.go b/modules/setting/log.go index c6b5b1a617..aafb4b3725 100644 --- a/modules/setting/log.go +++ b/modules/setting/log.go @@ -273,6 +273,15 @@ func newLogService() { golog.SetOutput(log.NewLoggerAsWriter("INFO", log.GetLogger(log.DEFAULT))) } +// NewLogServices creates all the log services +func NewLogServices(disableConsole bool) { + newLogService() + newMacaronLogService() + newRouterLogService() + newAccessLogService() + NewXORMLogService(disableConsole) +} + // NewXORMLogService initializes xorm logger service func NewXORMLogService(disableConsole bool) { EnableXORMLog = Cfg.Section("log").Key("ENABLE_XORM_LOG").MustBool(true) diff --git a/modules/setting/setting.go b/modules/setting/setting.go index b6c5740024..ab290fc4fc 100644 --- a/modules/setting/setting.go +++ b/modules/setting/setting.go @@ -982,11 +982,7 @@ func loadOrGenerateInternalToken(sec *ini.Section) string { // NewServices initializes the services func NewServices() { newService() - newLogService() - newMacaronLogService() - newAccessLogService() - newRouterLogService() - NewXORMLogService(false) + NewLogServices(false) newCacheService() newSessionService() newMailService() |