简体   繁体   中英

How many projects use Async Logger in log4j2?

Async loggers in log4j2 can improve the logging performance a lot, but are they robust enough? When programs are killed unexpectedly, will the logging messages before that time point be flushed into disk? And does anyone know how many big projects(such as apache projects) use async loggers and give some examples? Any help will be appreciated.

When any process dies you are liable to lose log events that are being buffered. Most people who use File Appenders turn buffering on because the performance without it is considerably slower. Events in the OS buffer would be lost in that case. Likewise with most network protocols, unless you are using something like Apache Flume that immediately acknowledges the receipt, but even then a few messages could be lost simply because the process died before the data was written. But Remko's answer covers the subject of losing messages better than I could.

As for who uses it I can only answer that we know that Async Loggers are being used since we do get questions from time to time but there is no way to formally track who is using any open source project, much less how.

我的公司将异步记录器用于任务关键型股票交易系统,没有问题。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM