Skip to content

A Slack logger backend for Elixir using :gen_event

Notifications You must be signed in to change notification settings

h3poteto/ex_slack_logger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ExSlackLogger

Hex.pm Hex.pm Reviewed by Hound

ExSlackLogger is a logger backend module for Slack.

Installation

Add ex_slack_logger to your list of dependencies in mix.exs:

def deps do
  [
    {:ex_slack_logger, "~> 0.1.0"}
  ]
end

Usage

At frist, add ExSlackLogger as logger backend in your config.exs.

config :logger, backends: [:console, ExSlackLogger]

Next, configure logger backend.

config :logger, ExSlackLogger,
  level: :error,
  hook_url: {:system, "SLACK_WEBHOOK_URL"},
  channel: "#your_slack_channel_name",
  username: "slack_user_name"

After that, you can receive application log in your slack channel.

License

The software is available as open source under the terms of the MIT License.