Created
April 27, 2018 17:35
-
-
Save lucasrodriguex/822b25a3258176fe808a22fbc015d4c7 to your computer and use it in GitHub Desktop.
Kibana logback appender
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
<appender name="server-json" class="ch.qos.logback.core.rolling.RollingFileAppender"> | |
<Append>true</Append> | |
<File>${LOG_PATH:-.}/json.log</File> | |
<encoder class="net.logstash.logback.encoder.LogstashEncoder"> | |
<fieldNames> | |
<thread>[ignore]</thread> | |
<levelValue>[ignore]</levelValue> | |
<timestamp>timestamp</timestamp> | |
<version>version</version> | |
</fieldNames> | |
<customFields>{"application": "${projetc.artifactId}"}</customFields> | |
<throwableConverter class="net.logstash.logback.stacktrace.ShortenedThrowableConverter"> | |
<maxDepthPerThrowable>30</maxDepthPerThrowable> | |
<maxLength>2048</maxLength> | |
<shortenedClassNameLength>20</shortenedClassNameLength> | |
<exclude>sun\.reflect\..*\.invoke.*</exclude> | |
<exclude>net\.sf\.cglib\.proxy\.MethodProxy\.invoke</exclude> | |
<rootCauseFirst>true</rootCauseFirst> | |
</throwableConverter> | |
</encoder> | |
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> | |
<fileNamePattern>${LOG_PATH:-.}/json.log%d{yyyy-MM-dd}</fileNamePattern> | |
<maxHistory>10</maxHistory> | |
</rollingPolicy> | |
</appender> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment