Created
July 9, 2018 08:16
-
-
Save hrchu/f946dc4f3548e5cc3f42cb1d9985e429 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> | |
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false"> | |
<appender name="logstash" class="org.apache.log4j.net.SocketAppender"> | |
<param name="Port" value="9527"/> | |
<param name="RemoteHost" value="127.0.0.1"/> | |
</appender> | |
<!-- Prevent blocking when something goes wrong --> | |
<appender name="asyncLogstash" class="org.apache.log4j.AsyncAppender"> | |
<param name="BufferSize" value="20"/> | |
<param name="Blocking" value="false"/> | |
<appender-ref ref="logstash"/> | |
</appender> | |
<logger name="error"> | |
<level value="ERROR"/> | |
<appender-ref ref="asyncLogstash"/> | |
</logger> | |
</log4j:configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
input { | |
log4j { | |
mode => "server" | |
host => "127.0.0.1" | |
port => 9527 | |
type => "log4j" | |
} | |
} | |
output { | |
elasticsearch { | |
protocol => "http" | |
host => "192.168.201.37" | |
port => 9200 | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment