Unable to get Log4J SocketAppender Working

别说谁变了你拦得住时间么 提交于 2019-12-06 05:39:01

The log4j input in Logstash is not compatible with Log4j2. Log4j2 uses a new format to serialize the log data.

There is however a plugin which enables parsing of Log4j2 sockets: https://github.com/jurmous/logstash-log4j2

In logstash 1.5+ it can be installed from: https://rubygems.org/gems/logstash-input-log4j2

I think you should replace 0.0.0.0 with your IP on the following line:

<Socket name="A1" host="0.0.0.0" port="4560">

And add the following lines in elements <Root ...> and <Logger ...> (like you did for AsyncFile appender):

<AppenderRef ref="A1" />
<AppenderRef ref="RollingFile" />  
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!