https://github.com/azohra/quack
An Elixir Logger backend for slack
https://github.com/azohra/quack
backend elixir exporter logger slack
Last synced: 10 months ago
JSON representation
An Elixir Logger backend for slack
- Host: GitHub
- URL: https://github.com/azohra/quack
- Owner: azohra
- License: mit
- Created: 2018-11-15T19:46:10.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-12-13T21:12:49.000Z (about 7 years ago)
- Last Synced: 2025-03-21T22:21:47.236Z (10 months ago)
- Topics: backend, elixir, exporter, logger, slack
- Language: Elixir
- Size: 276 KB
- Stars: 13
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Quack
[](https://hex.pm/packages/quack)
[](https://github.com/azohra/Quack/blob/master/LICENSE.md)
A simple, yet beautiful, Elixir Logger backend for Slack
## Installation
The package can be installed by adding `quack` to your list of dependencies in `mix.exs`:
```elixir
def deps do
[
{:quack, "~> 0.1.1"}
]
end
```
Then add Quack to your list of extra applications:
```elixir
def application do
[
mod: {MyApplication, []},
extra_applications: [:logger, :quack]
]
end
```
## Configuration
Configure the Slack incoming webhook:
```elixir
config :quack, webhook_url: "https://hooks.slack.com/services/...."
```
Configure your Logger application to use Quack as a backend:
```elixir
config :logger, backends: [:console, Quack.Logger]
```
Configure the minimum-level of logs you want exported to Slack:
```elixir
# Options are [:debug, :info, :warn, :error]
config :quack, level: :debug
```
Configure which metadata you want to report on:
```elixir
# You can specify a list of containing these fields:
# [
# :application,
# :module,
# :function,
# :file,
# :line,
# :pid,
# :crash_reason,
# :initial_call,
# :registered_name
# ]
config :quack, meta: [:file, :function, :line]
# Or you can specify absolutes such as :all, or :none
config :quack, meta: :none
```
The complete configuration should look something like this:
```elixir
config :quack,
level: :info,
meta: [:file, :function, :line],
webhook_url: "https://hooks.slack.com/services/..."
config :logger, backends: [:console, Quack.Logger]
```
## Examples



