Skip to content
An Elixir logger backend for posting errors to Slack.
Elixir
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
config
lib
test
.gitignore
.travis.yml
LICENSE
README.md
mix.exs
mix.lock

README.md

slack_logger_backend

Build Status Coverage Status hex.pm version hex.pm downloads Inline docs

A logger backend for posting errors to Slack.

You can find the hex package here, and the docs here.

Usage

First, add the client to your mix.exs dependencies:

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

Then run $ mix do deps.get, compile to download and compile your dependencies.

Finally, add the :slack_logger_backend application as your list of applications in mix.exs:

def application do
  [applications: [:logger, :slack_logger_backend]]
end

You can set the log levels you want posted to slack in the config:

config :slack_logger_backend, :levels, [:debug, :info, :warn, :error]

You'll need to create a custom incoming webhook URL for your Slack team. You can either configure the webhook in your config:

config :slack_logger_backend, :slack, [url: "http://example.com"]

... or you can put the webhook URL in the SLACK_LOGGER_WEBHOOK_URL environment variable if you prefer. If you have both the environment variable will be preferred.

TODO

  • Improve documentation
  • Backoff strategies
Something went wrong with that request. Please try again.