LoggerLogentriesBackend

About

A backend for the Elixir Logger that will send logs to the Logentries TCP input.

Supported options

Using it with Mix

To use it in your Mix projects, first add it as a dependency:

def deps do
  [{:logger_logentries_backend, github: "sysdia-solutions/logger_logentries_backend"}]
end

Then run mix deps.get to install it.

Configuration Examples

Runtime

Logger.add_backend {Logger.Backend.Logentries, :debug}
Logger.configure {Logger.Backend.Logentries, :debug},
  host: 'data.logentries.com',
  port: 10000,
  token: "logentries-token-goes-here",
  level: :debug,
  format: "[$level] $message\n"

Application config

config :logger,
  backends: [{Logger.Backend.Logentries, :error_log}, :console]

config :logger, :error_log,
  host: 'data.logentries.com',
  port: 10000,
  token: "logentries-token-goes-here",
  level: :error,
  format: "[$level] $message\n"