mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 19:10:54 +00:00
logger changed
This commit is contained in:
parent
826f81f479
commit
45f2390128
@ -143,8 +143,8 @@ func NewLogger(channelLens ...int64) *BeeLogger {
|
|||||||
bl.level = LevelDebug
|
bl.level = LevelDebug
|
||||||
bl.loggerFuncCallDepth = 2
|
bl.loggerFuncCallDepth = 2
|
||||||
bl.msgChanLen = append(channelLens, 0)[0]
|
bl.msgChanLen = append(channelLens, 0)[0]
|
||||||
if bl.msgChanLen < 0 {
|
if bl.msgChanLen <= 0 {
|
||||||
bl.msgChanLen = 0
|
bl.msgChanLen = defaultAsyncMsgLen
|
||||||
}
|
}
|
||||||
bl.signalChan = make(chan string, 1)
|
bl.signalChan = make(chan string, 1)
|
||||||
bl.setLogger(AdapterConsole)
|
bl.setLogger(AdapterConsole)
|
||||||
@ -159,9 +159,6 @@ func (bl *BeeLogger) Async() *BeeLogger {
|
|||||||
return bl
|
return bl
|
||||||
}
|
}
|
||||||
bl.asynchronous = true
|
bl.asynchronous = true
|
||||||
if bl.msgChanLen <= 0 {
|
|
||||||
bl.msgChanLen = defaultAsyncMsgLen
|
|
||||||
}
|
|
||||||
bl.msgChan = make(chan *logMsg, bl.msgChanLen)
|
bl.msgChan = make(chan *logMsg, bl.msgChanLen)
|
||||||
logMsgPool = &sync.Pool{
|
logMsgPool = &sync.Pool{
|
||||||
New: func() interface{} {
|
New: func() interface{} {
|
||||||
|
Loading…
Reference in New Issue
Block a user