atomkirk
Using elixir 1.15 logger filter features
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?
Most Liked
josevalim
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. ![]()
sorentwo
Yes, understood—that’s what the log option is used for. From the Oban docs:
:log— eitherfalseto 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 tofalse, where no queries are logged.
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #javascript
- #code-sync
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance








