cihub / seelog

Seelog is a native Go logging library that provides flexible asynchronous dispatching, filtering, and formatting.
BSD 3-Clause "New" or "Revised" License
1.64k stars 243 forks source link

Seelog queue overflow: more than 10000 messages in the queue. Flushing. #160

Closed carl-leopard closed 6 years ago

carl-leopard commented 6 years ago

短时间内产生大量的日志导致服务器崩溃

1522140840 commented 6 years ago

这个问题解决了吗?我昨天遇到了【cihub/seelog是新代码】

carl-leopard commented 6 years ago

没有, 短时间产生大量的日志, 会导致日志丢失

huaapp commented 5 years ago

https://github.com/cihub/seelog/wiki/Logger-types

huaapp commented 5 years ago

We've just recommended the rule for async timer's interval tuning: the average interval of message consuming should be less than the average interval of message producing.

Current log messages limit in the queue is 10000.

But how do you know whether you set it correct and unwanted flushes don't happen? This is pretty simple: Seelog will write a following message to the stdout (Seelog uses stdout to output its internal errors, messages, etc.): "Seelog queue overflow: more than 10000 messages in the queue." So if you are tuning your async timer interval and want to see whether it is all okay with the queue check the flush messages from Seelog in your stdout.

carl-leopard commented 5 years ago

thanks.