Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure level for specific crate #9

Closed
MarcAntoine-Arnaud opened this issue Dec 12, 2022 · 1 comment
Closed

Configure level for specific crate #9

MarcAntoine-Arnaud opened this issue Dec 12, 2022 · 1 comment

Comments

@MarcAntoine-Arnaud
Copy link

I wanna to know if it's possible to init the logger with specific level for a crate ?

Something like: https://docs.rs/env_logger/0.10.0/env_logger/struct.Builder.html#method.filter_module

Thank you very much.
Marc-Antoine

@iamcodemaker
Copy link
Owner

iamcodemaker commented Dec 15, 2022

This is possible, but you have to use the fern crate's level_for filter to do this with console_log. The console_log::log can be passed to fern's chain method. See the console_log::log docs for an example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants