GELF client library for Java based on Netty 4
Failed to load latest commit information.
.travis.yml Update Maven plugins Jun 8, 2016 Add changelog for version 1.4.0 May 30, 2016 Update Aug 22, 2014
LICENSE Add ASL2 license file Sep 4, 2015 Bump current version number May 31, 2016
pom.xml [maven-release-plugin] prepare for next development iteration Oct 22, 2016

GELF Client

Build Status Coverage Status

A Java GELF client library with support for different transports.

Available transports:

  • TCP
  • UDP

All default transport implementations use a queue to send messages in a background thread to avoid blocking the calling thread until a message has been sent. That means that the send() and trySend() methods do not actually send the messages but add them to a queue where the background thread will pick them up. This is important to keep in mind when it comes to message delivery guarantees.

The library uses Netty v4 to handle all network related tasks and Jackson for JSON encoding.


Maven Dependency



public class Application {
    public static void main(String[] args) {
        final GelfConfiguration config = new GelfConfiguration(new InetSocketAddress("", 12201))

        final GelfTransport transport = GelfTransports.create(config);
        final GelfMessageBuilder builder = new GelfMessageBuilder("", "")
                .additionalField("_foo", "bar");

        boolean blocking = false;
        for (int i = 0; i < 100; i++) {
            final GelfMessage message = builder.message("This is message #" + i)
                    .additionalField("_count", i)

            if (blocking) {
                // Blocks until there is capacity in the queue
            } else {
                // Returns false if there isn't enough room in the queue
                boolean enqueued = transport.trySend(message);


Please see CONTRIBUTING for details.


Apache License, Version 2.0 --