View Source Insight Hub (Bugsnag) notifier for Erlang
Usage
You may send custom errors directly
bugsnag:notify(error, fake, "Testing bugsnag with a manual error report", no_module, 0).
Or use the Erlang error logger
error_logger:error_msg("A sample error caught by the bugsnag error logger.").
Or logger
:
?LOG_ERROR(#{what => example_error, text => "A sample error caught by the bugsnag logger handler"}).
When embedding, make sure to set up the configuration elements in your sys.config
(or other config file),
See bugsnag
for configuration details.
Lager handler
We also provide a lager handler to report anything
above a certain level (by default, error
) to Bugsnag.
For example, simply add to your sys.config
{bugsnag_lager_handler, critical}
to your lager handler config.
Testing
To test the codebase:
make test
Formatting
To format the codebase
make format
Thanks
Thank you to Ken Pratt: his library https://github.com/kenpratt/erlbrake provided a lot of code for this library.