An open API service indexing awesome lists of open source software.

https://github.com/therealowenrees/logger_webhook_backend

A backend for Elixir's Logger, allowing the sending of logs direct to webhooks.
https://github.com/therealowenrees/logger_webhook_backend

elixir error-handling logger

Last synced: 5 months ago
JSON representation

A backend for Elixir's Logger, allowing the sending of logs direct to webhooks.

Awesome Lists containing this project

README

          

# Logger Webhook Backend

A Logger backend that sends logs to a webhook. Currently only tested with Discord.

## Installation

The package can be installed by adding `logger_webhook_backend` to your list of dependencies in `mix.exs`:

```elixir
def deps do
[
{:logger_webhook_backend, "~> 0.0.2"}
]
end
```

## Configuration

`LoggerWebhookBackend` can be configured in your `config.exs` file:

```elixir
config :logger,
backends: [{LoggerWebhookBackend, :webhook_logger}]

config :logger, :webhook_logger, level: :error
```

Environment variables can be set in your `runtime.exs` file:

```elixir
config :logger, :webhook_logger,
webhook_url: System.get_env("WEBHOOK_URL")
```