Skip to content

kiwiproject/dropwizard-elk-appender

Repository files navigation

Dropwizard ELK Appender

Build Quality Gate Status Coverage CodeQL javadoc License: MIT Maven Central

Dropwizard Logging Appender to send logging events to the ELK stack.

How to use

Install library with Maven:

    <dependency>
        <groupId>org.kiwiproject</groupId>
        <artifactId>dropwizard-elk-appender</artifactId>
        <version>[current-version]</version>
    </dependency>

Add to Dropwizard config:

    logging:
      level: WARN
      appenders:
        - type: elk
          host: localhost
          port: 9000

Properties that can be set in the config:

Property Name Default Description
host (required) blank Hostname for the logstash server
port (required) 0 Port (greater than zero) for the logstash server
includeCallerData false Whether the calling data gets included in the message to logstash
includeMdc true Whether to include the MDC in the message to logstash
includeContext true Whether to include the logging context in the message to logstash
customFields empty Map of custom fields that are to be sent to logstash for processing
fieldNames empty Map of field name mappings if overrides are needed