Skip to content

feat: add target filter - #44

Merged
tisonkun merged 3 commits into
fast:mainfrom
andylokandy:dev2
Aug 13, 2024
Merged

tisonkun merged 3 commits into
fast:mainfrom
andylokandy:dev2

Conversation

@andylokandy

@andylokandy andylokandy commented Aug 13, 2024 •

Copy link
Copy Markdown
Contributor

closes #8

@andylokandy
andylokandy requested a review from tisonkun August 13, 2024 13:04
@tisonkun

Copy link
Copy Markdown
Contributor

@andylokandy this should close #8

I have some questions when considering the design of this filter, you can take a look #8 (comment)

Those can be faq when using this filter.

@andylokandy

Copy link
Copy Markdown
Contributor Author

Yes. I'm following the idea in #8.

Q: If multiple LogLevelModuleFilter configured? What's the manner? Especially if the targets are overlapped
A: Simply apply by the filter order

Q: What is the priority between LogLevelModuleFilter and LevelFilter.
A: LogLevelModuleFilter is super set of LevelFilter. LevelFilter is simpler to use.

Q: Filters are applied in order, but when to short circuit the test (by Accepted/Rejected)
A: LevelFilter will reject if level is lower than levelfilter, and LogLevelModuleFilter will reject if level is lower than levelfilter and the target is matched

Comment thread src/filter/level.rs Resolved

@tisonkun tisonkun left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM. One minor comment inline.

Comment thread src/filter/target.rs Resolved
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.

LogLevelModuleFilter

2 participants