Skip to content

Commit d922c35

Browse files
authored
Update logger_backend.ex
1 parent a31118e commit d922c35

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/sentry/logger_backend.ex

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
defmodule Sentry.LoggerBackend do
22
@moduledoc """
33
Report Logger events like crashed processes to Sentry. To include in your
4-
application, add this module to your Logger backends:
4+
application, start this backend in your application `start/2` callback:
55
6-
config :logger,
7-
backends: [:console, Sentry.LoggerBackend]
6+
# lib/my_app/application.ex
7+
def start(_type, _args) do
8+
Logger.add_backend(Sentry.LoggerBackend)
89
910
Sentry context will be included in metadata in reported events. Example:
1011

0 commit comments

Comments
 (0)