Logging: filter packages

Hey folks,

A quick question: I’ve set the logging level so that I can see @debug messages from my package as I develop stuff. However this will naturally also show @debug messages from other packages that are called from my code. I don’t want to see these: they clutter my logs with no relevant information to me.
Is there a way to “filter” log messages? In python you can filter some packages so that they log messages don’t show. Is there a way to only show debug messages from my code and @info/@warn from others?

Thank you

The “JULIA_DEBUG” environment variable allows you pick modules you wish to display debug info from. For example, if you are working from the Main module, you can enable @debug logs specifically for Main like so:

ENV["JULIA_DEBUG"] = Main

Here’s a link to a relevant section in the docs: Logging · The Julia Language

1 Like