# Gelfex

[![Build Status](](

Elixir client for logging GELF messages to Graylog.

At this time only the GELF TCP input is supported.

## Installation

If [available in Hex](, the package can be installed as:

  1. Add gelfex to your list of dependencies in `mix.exs`:

        def deps do
          [{:gelfex, "~> 0.0.1"}]

  2. Ensure gelfex is started before your application:

        def application do
          [applications: [:gelfex]]

## Configuration
In your applications config.exs you will need a new section for customizing the connection to Graylog

config :gelfex,
  host: "graylog.local",
  port: "112201"

## Usage
To create and send a message to Graylog:
message = Gelfex.Message.create(1, "This is my short message", "This is my long message")
{:ok} = Gelfex.Connection.send(message)