Fasil Koorambath
Fasil Koorambath

Reputation: 9

Beego NewLogger channelLens value

Can someone help me understand the significance of channelLens value in Beego NewLogger function. The documentation says channelLen means the number of messages in chan(used where asynchronous is true). if the buffering chan is full, logger adapters write to file or other way. & Its not clear for me. Thanks in advance

Upvotes: 0

Views: 67

Answers (1)

serge-v
serge-v

Reputation: 780

When you pass no parameter to NewLogger() it uses defaultAsyncMsgLen as internal channel size. This line: https://github.com/astaxie/beego/blob/v1.12.3/logs/log.go#L151

When you pass a parameter the logger uses it as internal channel size.

Upvotes: 0

Related Questions