Skip to content

furmanOFF/lager_slack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)
    ]}
  ]}
]}

About

Simple Slack backend for lager

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages