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

Add new separate filter_module and filter_level to Builder #13

Closed
sebasmagri opened this issue Aug 19, 2017 · 1 comment
Closed

Add new separate filter_module and filter_level to Builder #13

sebasmagri opened this issue Aug 19, 2017 · 1 comment

Comments

@sebasmagri
Copy link
Collaborator

No description provided.

@KodrAus KodrAus mentioned this issue Dec 10, 2017
2 tasks
@KodrAus KodrAus added this to the 0.5.x milestone Dec 28, 2017
@KodrAus
Copy link
Collaborator

KodrAus commented Dec 28, 2017

I think let's do this. The idea is we add two new methods to the fmt::Builder and root Builder types:

fn filter_module(&mut self, module: &str, level: LevelFilter) -> &mut Self {
    self.filter(Some(module), level)
}

fn filter_level(&mut self, level: LevelFilter) -> &mut Self {
    self.filter(None, level)
}

I think it's worthwhile because filter(None, level) actually means apply to logs from all modules. That seems a bit odd, since we're passing a value of None to the module.

@KodrAus KodrAus changed the title Should we add new separate filter_module and filter_level to Builder? Add new separate filter_module and filter_level to Builder Dec 28, 2017
epage added a commit to epage/env_logger that referenced this issue Apr 17, 2024
…on-3.x

chore(deps): update github/codeql-action action to v3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants