In the Logger docs it says:
Support for custom filters and handlers as provided by Erlang's :logger.
I really just want to create a simple filter that removes oban ecto queries from my output. I want to continue to see my own apps ecto queries. So I was thinking this would be a good way to do this but I’m not sure how. How do I create a filter as this bullet point suggests?
I found this on the internet and it looks correct: Elixir Logger and Erlang filters — TILs and Life
PRs to improve the docs will be very welcome too. 
4 Likes
There is a log
option for Oban so you can control the log level, or even silence it with log: false
the logging I want to silence is coming from obans use of my ecto repo, not oban itself
Yes, understood—that’s what the log
option is used for. From the Oban docs:
:log
— either false
to disable logging or a standard log level (:error
, :warning
, :info
, :debug
, etc.). This determines whether queries are logged or not; overriding the repo’s configured log level. Defaults to false
, where no queries are logged.
1 Like