Pitcher

Pitcher is an Elixir Logger backend used to send logs to a custom REST endpoint.

Options

Installation

Simply add to your mix.exs file as a dependency:

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

Then run mix deps.get to install it.

Configuration

config :logger,
  backends: [{Logger.Backend.Pitcher, :my_error_log}, :console]

config :logger, :my_error_log,
  url: "https://mydomain.com/logs",
  method: :put,
  level: :error,
  format: "[$level] $message\n"