https://github.com/elli-lib/elli_log_exceptions
Elli middleware that will log the exceptions that result in 500 status responses.
https://github.com/elli-lib/elli_log_exceptions
Last synced: about 2 months ago
JSON representation
Elli middleware that will log the exceptions that result in 500 status responses.
- Host: GitHub
- URL: https://github.com/elli-lib/elli_log_exceptions
- Owner: elli-lib
- License: apache-2.0
- Created: 2019-10-04T16:32:59.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-10-04T16:35:07.000Z (over 6 years ago)
- Last Synced: 2025-12-30T23:12:11.787Z (6 months ago)
- Language: Erlang
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
elli_log_exceptions
=====
[Elli](https://github.com/elli-lib/elli) middleware that will log exceptions at a configurable log level and with or without the full stacktrace:
```erlang
ElliOpts = [{callback, elli_middleware},
{callback_args, [{mods, [{elli_log_exceptions, elli_log_exceptions:config([])},
...]}]},
{port, 3000}],
ElliChildSpec = #{id => elli_handler,
start => {elli, start_link, [ElliOpts]},
restart => permanent,
type => worker,
modules => [elli_log_exceptions]},
```
`elli_log_exceptions:config/1` takes a proplist of options:
* `level`: The logger level to log the exception (example, `{level, error}`).
* `include_stacktrace`: If true the log will include the stacktrace from the exception.