Skip to content

Commit

Permalink
Give prevalence to process level over global level
Browse files Browse the repository at this point in the history
  • Loading branch information
v0idpwn committed Nov 3, 2024
1 parent 7d56cfa commit 739eaaa
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions lib/logger/lib/logger.ex
Original file line number Diff line number Diff line change
Expand Up @@ -940,8 +940,14 @@ defmodule Logger do
def __should_log__(level, module) do
level = elixir_level_to_erlang_level(level)

if :logger_config.allow(level, module) do
level
case get_process_level(self()) do
nil ->
if :logger_config.allow(level, module) do
level
end

process_level ->
process_level
end
end

Expand Down

0 comments on commit 739eaaa

Please sign in to comment.