org.springframework.boot.logging.logback.logstash-appender.xml Maven / Gradle / Ivy
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE xml> <included> <!-- <appender name="LOGSTASH" class="ch.qos.logback.core.ConsoleAppender"> --> <appender name="LOGSTASH" class="net.logstash.logback.appender.LogstashTcpSocketAppender"> <destination>${LOGSTASH_DESTINATION:-${LOGSTASH_HOST:-localhost}:${LOGSTASH_PORT:-4560}}</destination> <!-- <encoder class="net.logstash.logback.encoder.LogstashEncoder" /> --> <encoder class="net.logstash.logback.encoder.LoggingEventCompositeJsonEncoder"> <providers> <pattern> <pattern> { <!-- "date":"%d{yyyy-MM-dd'T'HH:mm:ss.SSSZZ}", --> "relative":"%r", <!-- "level":"%le", --> <!-- "level":"%p", --> <!-- "thread":"%t", --> <!-- "logger":"%lo", --> <!-- "logger":"%c", --> <!-- "message":"%m", --> <!-- "message":"%msg", --> <!-- "class":"%C", --> <!-- "method": "%M", --> <!-- "line":"%L", --> <!-- "file":"%F", --> <!-- "mdc":"%X", --> "exception":"%ex", <!-- "exception":"%throwable", --> "rootException":"%rEx", "xException":"%xEx", <!-- "xException":"%xThrowable", --> "nopexception":"%nopex", "contextName":"%cn", <!-- "caller":"%caller", --> <!-- "marker":"%marker", --> "property":"%property", <!-- "n":"%n", --> "lsn":"%lsn" } </pattern> </pattern> <timestamp /> <version /> <message /> <loggerName /> <threadName /> <logLevel /> <logLevelValue /> <callerData /> <stackTrace /> <context /> <jsonMessage /> <mdc /> <contextMap /> <jsonMessage /> <globalCustomFields /> <tags /> <logstashMarkers /> </providers> </encoder> </appender> </included>