Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ken-matsui/logger_slack_backend
Simple logger backend that sends to Slack channel using webhook API
https://github.com/ken-matsui/logger_slack_backend
Last synced: about 1 month ago
JSON representation
Simple logger backend that sends to Slack channel using webhook API
- Host: GitHub
- URL: https://github.com/ken-matsui/logger_slack_backend
- Owner: ken-matsui
- License: mit
- Created: 2018-06-25T23:33:32.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-09-04T03:46:24.000Z (over 5 years ago)
- Last Synced: 2024-11-29T04:48:44.969Z (about 1 month ago)
- Language: Elixir
- Homepage: https://hex.pm/packages/logger_slack_backend
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# LoggerSlackBackend
**TODO: Add description**
## Installation
If [available in Hex](https://hex.pm/docs/publish), the package can be installed
by adding `logger_slack_backend` to your list of dependencies in `mix.exs`:```elixir
def deps do
[
{:logger_slack_backend, "~> 0.1.0"}
]
end
``````elixir:config.exs
config :logger_slack_backend,
webhook_url: System.get_env("SLACK_WEBHOOK_URL")# Configures Elixir's Logger
config :logger,
backends: [
:console,
{LoggerSlackBackend, :info},
{LoggerSlackBackend, :error}
]config :logger, :console,
format: "$time $metadata[$level] $message\n",
metadata: [:request_id]config :logger, :info,
level: :info,
format: "$time $metadata[$level] $message\n",
metadata: [:request_id]config :logger, :error,
level: :error,
format: "$time $metadata[$level] $message\n",
metadata: [:request_id]
```Documentation can be generated with [ExDoc](https://github.com/elixir-lang/ex_doc)
and published on [HexDocs](https://hexdocs.pm). Once published, the docs can
be found at [https://hexdocs.pm/logger_slack_backend](https://hexdocs.pm/logger_slack_backend).