LoggerLogglyBackend

Loggly logger backend for Elixir

Installation

  1. Add logger_loggly_backend to your list of dependencies in mix.exs:
def deps do
[{:logger_loggly_backend, "~> 0.1.0"}]
end
  1. Ensure logger_loggly_backend is started before your application:
def application do
[applications: [:logger_loggly_backend]]
end
  1. Configure the logger
config :logger,
backends: [{LoggerLogglyBackend, :loggly}, :console]
config :logger, :loggly,
host: "http://logs-01.loggly.com",
type: :inputs,
token: "your secret token",
tags: ["http", "staging"],
level: :error

The configuration defaults to:

config :logger, :loggly,
host: "http://logs-01.loggly.com",
type: :inputs,
token: System.get_env("LOGGLY_TOKEN"), # so you can set the token as an environment variable which is recommended
tags: [],
level: :info