• Stars
    star
    2
  • Language
    Erlang
  • License
    MIT License
  • Created about 6 years ago
  • Updated almost 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Simple Slack backend for lager

lager_slack

Simple Slack backend for lager

Format

lager_slack buffers incoming logs and sends them in packs of 20 logs per Slack message (as attachments).

Configuration

To use this backend you must provide it with a Slack Webhook link to specific channel.

{lager, [
  {handlers, [
    {lager_slack_backend, [
      {uri, "https://hooks.slack.com/..."}, % (required) Webhook URI
      {metadata, [pid, module]},            % Lager metadata appended to message (default: module)
      {sign, "MyApp"},                      % Message sign to identify your reports (appears in message footer)
      {level, error},                       % Log level (default: critical)
      {timeout, 5000},                      % (optional) Slack submit timeout in ms (default: 5000)
      {threshold, 20}                       % (optional) Max message attachement count (default/recommended: 20)
    ]}
  ]}
]}