Skip to content

Commit

Permalink
revert to sentry logger backend (#4919)
Browse files Browse the repository at this point in the history
  • Loading branch information
ruslandoga authored Dec 18, 2024
1 parent 8a9bdf8 commit 15a38cc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 4 additions & 0 deletions config/runtime.exs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ log_level =
config :logger, level: log_level
config :logger, :default_formatter, metadata: [:request_id]

config :logger, Sentry.LoggerBackend,
capture_log_messages: true,
level: :error

case String.downcase(log_format) do
"standard" ->
config :logger, :default_formatter, format: "$time $metadata[$level] $message\n"
Expand Down
4 changes: 1 addition & 3 deletions lib/plausible/application.ex
Original file line number Diff line number Diff line change
Expand Up @@ -226,9 +226,7 @@ defmodule Plausible.Application do
end

def setup_sentry() do
:logger.add_handler(:sentry_handler, Sentry.LoggerHandler, %{
config: %{capture_log_messages: true, level: :error}
})
Logger.add_backend(Sentry.LoggerBackend)

:telemetry.attach_many(
"oban-errors",
Expand Down

0 comments on commit 15a38cc

Please sign in to comment.