问题
Is there a lightweight logging framework/server I can use to setup remote logging in 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
回答1:
You could use log4j with a SyslogAppender and use some tool for viewing the syslog(-ng).
Use the async appender wrapper that ships with log4j, a nice article about that can be found here.
回答2:
Apache Flume and Apache Kafka are two solutions that may be of use. I've seen them mentioned by the high scalability crowd a fair bit recently.
Neither is particularly similar to log4j, though.
来源:https://stackoverflow.com/questions/9328891/asynchronous-non-blocking-remote-logging-in-java