mirror of
https://github.com/plausible/analytics.git
synced 2024-12-22 17:11:36 +03:00
revert to sentry logger backend (#4919)
This commit is contained in:
parent
8a9bdf85fb
commit
15a38cc580
@ -29,6 +29,10 @@ log_level =
|
|||||||
config :logger, level: log_level
|
config :logger, level: log_level
|
||||||
config :logger, :default_formatter, metadata: [:request_id]
|
config :logger, :default_formatter, metadata: [:request_id]
|
||||||
|
|
||||||
|
config :logger, Sentry.LoggerBackend,
|
||||||
|
capture_log_messages: true,
|
||||||
|
level: :error
|
||||||
|
|
||||||
case String.downcase(log_format) do
|
case String.downcase(log_format) do
|
||||||
"standard" ->
|
"standard" ->
|
||||||
config :logger, :default_formatter, format: "$time $metadata[$level] $message\n"
|
config :logger, :default_formatter, format: "$time $metadata[$level] $message\n"
|
||||||
|
@ -226,9 +226,7 @@ defmodule Plausible.Application do
|
|||||||
end
|
end
|
||||||
|
|
||||||
def setup_sentry() do
|
def setup_sentry() do
|
||||||
:logger.add_handler(:sentry_handler, Sentry.LoggerHandler, %{
|
Logger.add_backend(Sentry.LoggerBackend)
|
||||||
config: %{capture_log_messages: true, level: :error}
|
|
||||||
})
|
|
||||||
|
|
||||||
:telemetry.attach_many(
|
:telemetry.attach_many(
|
||||||
"oban-errors",
|
"oban-errors",
|
||||||
|
Loading…
Reference in New Issue
Block a user