Skip to content

Elli middleware that will log the exceptions that result in 500 status responses.

License

Notifications You must be signed in to change notification settings

elli-lib/elli_log_exceptions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

c0aea49 · Oct 4, 2019

History

1 Commit
Oct 4, 2019
Oct 4, 2019
Oct 4, 2019
Oct 4, 2019
Oct 4, 2019
Oct 4, 2019

Repository files navigation

elli_log_exceptions

Elli middleware that will log exceptions at a configurable log level and with or without the full stacktrace:

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.

About

Elli middleware that will log the exceptions that result in 500 status responses.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages