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

feat: support env filter #55

Merged
merged 4 commits into from
Aug 16, 2024
Merged

feat: support env filter #55

merged 4 commits into from
Aug 16, 2024

Conversation

tisonkun
Copy link
Contributor

This closes #54

Signed-off-by: tison <[email protected]>
Signed-off-by: tison <[email protected]>
use logforth::Dispatch;
use logforth::Logger;

fn main() {
Copy link
Contributor

@andylokandy andylokandy Aug 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It may be better if you add some examples of command line args for different env filter cases.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Things like RUST_LOG=info cargo run --features="env-filter" --example env_filter ..

I don't find a place suitable for this and would prefer to postpone it as a follow-up.

@@ -89,7 +89,7 @@ impl<const LAYOUT: bool, const APPEND: bool> Dispatch<LAYOUT, APPEND> {
impl Dispatch {
fn enabled(&self, metadata: &Metadata) -> bool {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is function unused?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's used in L175

Signed-off-by: tison <[email protected]>
@tisonkun tisonkun merged commit 21f4e70 into main Aug 16, 2024
5 checks passed
@tisonkun tisonkun deleted the env-filter branch August 16, 2024 09:52
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

Successfully merging this pull request may close these issues.

EnvFilter
2 participants