Made slow queries logging disabled by default.
This commit is contained in:
parent
3e9e7178bc
commit
08c0f09bad
2 changed files with 8 additions and 2 deletions
|
|
@ -106,7 +106,9 @@ defmodule Pleroma.Telemetry.Logger do
|
|||
) do
|
||||
logging_config = Pleroma.Config.get([:telemetry, :slow_queries_logging], [])
|
||||
|
||||
if logging_config[:min_duration] && query_time > logging_config[:min_duration] and
|
||||
if logging_config[:enabled] &&
|
||||
logging_config[:min_duration] &&
|
||||
query_time > logging_config[:min_duration] and
|
||||
(is_nil(logging_config[:exclude_sources]) or
|
||||
source not in logging_config[:exclude_sources]) do
|
||||
log_slow_query(measurements, metadata, config)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue