You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, this does not work as expected: what I would expect is that when setting RUST_LOG=some::module=info, all the other modules are still subject to the default level, "warn". However, default_filter_or says
Use the default environment variable to read the filter from.
If the variable is not set, the default value will be used.
So, once RUST_LOG is set, the default for all unspecified modules is "error" again.
Is there any way to truly change the default level for unspecified modules? If not, this is a feature request to add such an option. :)
The text was updated successfully, but these errors were encountered:
Ah it sounds like the way Env is only focused on reading and substituting stringly-typed environment variables is surprising for filters, where the value is a list. Since all other methods using filters are additive I think your expected behaviour of adding the default and reading from the environment makes the most sense here.
The docs recommend the following snippet to set the default level to, e.g., "warn":
However, this does not work as expected: what I would expect is that when setting
RUST_LOG=some::module=info
, all the other modules are still subject to the default level, "warn". However,default_filter_or
saysSo, once
RUST_LOG
is set, the default for all unspecified modules is "error" again.Is there any way to truly change the default level for unspecified modules? If not, this is a feature request to add such an option. :)
The text was updated successfully, but these errors were encountered: