Skip to content

Commit

Permalink
Propagate parent process logger level to preloader
Browse files Browse the repository at this point in the history
  • Loading branch information
v0idpwn committed Apr 23, 2024
1 parent bc88d85 commit f9eeecf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/ecto/repo/preloader.ex
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,11 @@ defmodule Ecto.Repo.Preloader do
# still necessary.
opts = Keyword.put_new(opts, :caller, self())
on_preloader_spawn = Keyword.get(opts, :on_preloader_spawn, fn -> :ok end)
parent_logger_level = Logger.get_process_level(self())

Check warning on line 139 in lib/ecto/repo/preloader.ex

View workflow job for this annotation

GitHub Actions / unit test (1.11.4, 21.3.8.24)

Logger.get_process_level/1 is undefined or private

preloaders
|> Task.async_stream(fn preloader ->
Logger.put_process_level(self(), parent_logger_level)

Check warning on line 143 in lib/ecto/repo/preloader.ex

View workflow job for this annotation

GitHub Actions / unit test (1.11.4, 21.3.8.24)

Logger.put_process_level/2 is undefined or private
on_preloader_spawn.()
preloader.({adapter_meta, opts})
end, timeout: :infinity)
Expand Down

0 comments on commit f9eeecf

Please sign in to comment.