Fork me on GitHub


Following settings can be used:

Attribute Name Description Default
host Hostname/IP-Address of the Logstash host. The host field accepts following forms:
  • tcp:hostname for TCP transport, e. g. tcp: or
  • udp:hostname for UDP transport, e. g. udp:, or just
  • redis://[:password@]hostname:port/db-number#listname for Redis transport. See Redis transport for logstash-gelf for details.
  • redis-sentinel://[:password@]hostname:port/db-number?masterId=masterId#listname for Redis transport with Sentinel lookup. See Redis transport for logstash-gelf for details.
port Port of the Logstash host 12201
version GELF Version 1.0 or 1.1 1.0
originHost Originating Hostname FQDN Hostname
extractStackTrace Send the Stack-Trace to the StackTrace field (true/false) false
filterStackTrace Perform Stack-Trace filtering (true/false) false
facility Name of the Facility logstash-gelf
mdcProfiling Perform Profiling (Call-Duration) based on MDC Data. See MDC Profiling for details false
additionalFields Send additional static fields. The fields are specified as key-value pairs are comma-separated. Example: additionalFields=fieldName=Value,fieldName2=Value2 none
additionalFieldTypes Type specification for additional and MDC fields. Supported types: String, long, Long, double, Double and discover (default if not specified, discover field type on parseability). Eg. field=String,field2=double discover for all additional fields
mdcFields Send additional fields whose values are obtained from MDC. Name of the Fields are comma-separated. Example: mdcFields=Application,Version,SomeOtherFieldName none
dynamicMdcFields Dynamic MDC Fields allows you to extract MDC values based on one or more regular expressions. Multiple regexes are comma-separated. The name of the MDC entry is used as GELF field name. none
includeFullMdc Include all fields from the MDC. false
maximumMessageSize Maximum message size (in bytes). If the message size is exceeded, the appender will submit the message in multiple chunks. 8192
timestampPattern Date/time pattern for the Time field yyyy-MM-dd HH:mm:ss,SSSS

The only mandatory field is host. All other fields are optional.

Please note: If the debug attribute of the configuration element is not set to true, internal appender errors are not shown.

Logback Configuration

logback.xml Example:

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE configuration>


    <appender name="gelf" class="biz.paluch.logging.gelf.logback.GelfLogbackAppender">
        <timestampPattern>yyyy-MM-dd HH:mm:ss,SSSS</timestampPattern>
        <filter class="ch.qos.logback.classic.filter.ThresholdFilter">

    <root level="DEBUG">
        <appender-ref ref="gelf" />