Skip to content
Logback Java appender for
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

LogDNA Logback appender

This library provides an appender for logback, allowing to send your logs to the LogDNA online logging platform, via their HTTPS Ingest API. MDC thread-bound data can be send, indexed and searched into your LogDNA dashboard.

How to use it

First, copy this dependency into your pom.xml file.


Note that this library relies on Jersey JAX-RS implementation with Jackson JSON mapper. For a lightweight implementation, you can check this other appender.

Copy the following two LogDna appenders to your classpath:/logback.xml file.

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

    <appender name="LogDnaHttp" class="net.zileo.logback.logdna.LogDnaAppender">
            <pattern>[%thread] %msg%n</pattern>
    <appender name="LogDna" class="ch.qos.logback.classic.AsyncAppender">
        <appender-ref ref="LogDnaHttp" />

    <appender name="Console" class="ch.qos.logback.core.ConsoleAppender">
            <pattern>%d{HH:mm} %-5level %msg%n</pattern>
    <root level="INFO">
        <appender-ref ref="Console" />
        <appender-ref ref="LogDna" />

This configuration is based on an asynchronous wrapper, for performance reason. Check this nice OverOps blog article for more info.

Configuration options

  • You can use your own pattern.
  • Set up your LOGDNA_INGEST_KEY (api key) via the System properties.
  • Set up the LOGDNA_INGEST_URL (api url) the same way. (Should be
  • Set up comma-separated tags if you want to.
  • Set up comma-separated MDC keys to index (from the MDC thread local binding).
  • Set up one type for each MDC key.

Possible types are string, boolean, int and long. The last two result in an indexed number in your LogDNA console, which is rather interesting, as it will allow you some functions inside your graphs (sum, average, etc...).

Proudly provided by

You can’t perform that action at this time.