From df3c8b8c98c67300466dd07e5eba65c65c55d042 Mon Sep 17 00:00:00 2001 From: Joshua Wood Date: Wed, 15 Jan 2025 15:17:17 -0800 Subject: [PATCH 1/3] Add use_logger config example --- README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9e90e74..e426b1f 100644 --- a/README.md +++ b/README.md @@ -102,7 +102,14 @@ end #### Logger Just set the `use_logger` option to `true` in your application's `config.exs` -and you're good to go! Any +and you're good to go: + +```elixir +config :honeybadger, + use_logger: true +``` + +Any [SASL](http://www.erlang.org/doc/apps/sasl/error_logging.html) compliant processes that crash will send an error report to the `Honeybadger.Logger`. After the error reaches the logger we take care of notifying Honeybadger for From 9d662423701a029fae2967dedea89cbee85ae76d Mon Sep 17 00:00:00 2001 From: Joshua Wood Date: Wed, 15 Jan 2025 15:23:46 -0800 Subject: [PATCH 2/3] Update version number and install package instructions --- README.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e426b1f..b02f7f3 100644 --- a/README.md +++ b/README.md @@ -23,14 +23,20 @@ Elixir Plug, Logger and client for the :zap: [Honeybadger error notifier](https: ### 1. Install the package Add the Honeybadger package to `deps/0` in your -application's `mix.exs` file and run `mix do deps.get, deps.compile` +application's `mix.exs`: ```elixir defp deps do - [{:honeybadger, "~> 0.16"}] + [{:honeybadger, "~> 0.22"}] end ``` +Then run: + +```sh +mix do deps.get, deps.compile +``` + ### 2. Set your API key and environment name By default the environment variable `HONEYBADGER_API_KEY` will be used to find From 48d219a8b8d3f439a88e2e1795800c74e94901b5 Mon Sep 17 00:00:00 2001 From: Joshua Wood Date: Wed, 15 Jan 2025 15:28:35 -0800 Subject: [PATCH 3/3] Add test error example --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index b02f7f3..fc38f9f 100644 --- a/README.md +++ b/README.md @@ -105,6 +105,14 @@ defmodule MyPlugApp do end ``` +### 4. Report a test error + +To report a test error to Honeybadger, fire up `iex -S mix`, then run: + +```elixir +Honeybadger.notify("Hello Elixir!") +``` + #### Logger Just set the `use_logger` option to `true` in your application's `config.exs`