Skip to content

Commit 77bc884

Browse files
AbhiPrasadmorgz
andauthored
elixir: Update crashed process exceptions guide (#4386)
Co-authored-by: Daniel Morgan <[email protected]>
1 parent 5dee761 commit 77bc884

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/wizard/elixir/index.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,15 @@ plug Sentry.PlugContext
8585

8686
`Sentry.PlugContext` gathers the contextual information for errors, and `Sentry.PlugCapture` captures and sends any errors that occur in the Plug stack. `Sentry.PlugContext` should be below `Plug.Parsers` if you are using it.
8787

88-
To capture crashed crashed process exceptions, add `Sentry.LoggerBackend` to your Logger backends:
88+
### Capture Crashed Process Exceptions
8989

90-
```
91-
config :logger,
92-
backends: [:console, Sentry.LoggerBackend]
90+
This library comes with an extension to capture all error messages that the Plug handler might not. This is based on [Logger.Backend](https://hexdocs.pm/logger/Logger.html#module-backends). You can add it as a backend when your application starts:
91+
92+
```elixir
93+
# lib/my_app/application.ex
94+
95+
def start(_type, _args) do
96+
Logger.add_backend(Sentry.LoggerBackend)
9397
```
9498

9599
## Capturing Errors

0 commit comments

Comments
 (0)