-
Notifications
You must be signed in to change notification settings - Fork 327
Open
Labels
Description
Elixir version
1.17.0-dev
Database and Version
PostgreSQL 14
Ecto Versions
Ecto 3.11
Database Adapter and Versions (postgrex, myxql, etc)
postgrex 0.17.5
Current behavior
I have a job that runs some queries that I'd like to exclude from logging in development. I'm using Logger.put_module_level
, which works just fine, except for queries caused by preloads. I also tried setting Logger.put_process_level
, but that also only works for the initial queries and not the preloads.
Expected behavior
As the logged information from the stacktrace includes the originating module, it would be nice if it used this information to lookup a level using Logger.get_module_level
or maybe even Logger.get_process_level
using the callers?
Maybe there are some other ideas on how to achieve this.
I'd be happy to work on a PR for this with some feedback on what the correct approach could be.