简体   繁体   English

Java中的异步非阻塞远程日志记录?

[英]Asynchronous non-blocking remote logging in Java?

Is there a lightweight logging framework/server I can use to setup remote logging in Java? 有没有可用于在Java中设置远程日志记录的轻量级日志记录框架/服务器? I know log4j has SocketAppenders but a) I want a library that is more out of the box where I can simply run a log server, b) I want the logging calls to be completely asynchronous non-blocking from the rest of the code and c) A nice web based dashboard/viewer on the log-server would be also nice 我知道log4j具有SocketAppenders,但是a)我想要一个更加开箱即用的库,可以在其中简单地运行日志服务器,b)我希望日志记录调用与其余代码和c完全异步无阻塞)日志服务器上基于Web的仪表板/查看器也不错

Apache Flume and Apache Kafka are two solutions that may be of use. Apache FlumeApache Kafka是两个可能有用的解决方案。 I've seen them mentioned by the high scalability crowd a fair bit recently. 我最近在高扩展性人群中看到了他们。

Neither is particularly similar to log4j, though. 不过,两者都不特别类似于log4j。

You could use log4j with a SyslogAppender and use some tool for viewing the syslog(-ng). 您可以将log4j与SyslogAppender一起使用,并使用一些工具来查看syslog(-ng)。 Use the async appender wrapper that ships with log4j, a nice article about that can be found here . 使用log4j附带的异步附加程序包装器,有关此内容的不错的文章可以在此处找到。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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