mirror of
https://gitee.com/gitea/gitea.git
synced 2024-12-03 20:28:04 +08:00
fix panic when push but the only log mode console is disabled by serv and update commands (#1007)
This commit is contained in:
parent
01d957677f
commit
d6748284bd
@ -22,6 +22,13 @@ var (
|
|||||||
XORMLogger *XORMLogBridge
|
XORMLogger *XORMLogBridge
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// DiscardXORMLogger inits a blank logger for xorm
|
||||||
|
func DiscardXORMLogger() {
|
||||||
|
XORMLogger = &XORMLogBridge{
|
||||||
|
showSQL: false,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// NewXORMLogger generate logger for xorm FIXME: configable
|
// NewXORMLogger generate logger for xorm FIXME: configable
|
||||||
func NewXORMLogger(bufferlen int64, mode, config string) {
|
func NewXORMLogger(bufferlen int64, mode, config string) {
|
||||||
logger := newLogger(bufferlen)
|
logger := newLogger(bufferlen)
|
||||||
|
@ -1096,6 +1096,10 @@ func NewXORMLogService(disableConsole bool) {
|
|||||||
}
|
}
|
||||||
log.XORMLogger.SetLevel(lvl)
|
log.XORMLogger.SetLevel(lvl)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if len(logConfigs) == 0 {
|
||||||
|
log.DiscardXORMLogger()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func newCacheService() {
|
func newCacheService() {
|
||||||
|
Loading…
Reference in New Issue
Block a user