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

dup_filter_sink adds parameters to enable setting the level of skipped logs #2563

Merged
merged 2 commits into from
Dec 2, 2022

Conversation

zydxhs
Copy link
Contributor

@zydxhs zydxhs commented Dec 1, 2022

By default, dup_filter_sink uses the info level to output duplicate messages.In some scenarios, users don't care about the messages and want to keep them at a lower level so they can ignore them.

@@ -41,15 +41,17 @@ class dup_filter_sink : public dist_sink<Mutex>
{
public:
template<class Rep, class Period>
explicit dup_filter_sink(std::chrono::duration<Rep, Period> max_skip_duration)
explicit dup_filter_sink(std::chrono::duration<Rep, Period> max_skip_duration, level::level_enum level = level::info)
Copy link
Owner

Choose a reason for hiding this comment

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

Please provide more descriptive name to this param. something like level::level_enum notification_level)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok

@zydxhs
Copy link
Contributor Author

zydxhs commented Dec 2, 2022

Hi, param name is changed.

@gabime gabime merged commit f0cd9d1 into gabime:v1.x Dec 2, 2022
@gabime
Copy link
Owner

gabime commented Dec 2, 2022

Merged. Thanks @zydxhs

@zydxhs zydxhs deleted the ftr_duplog_level branch December 2, 2022 09:40
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.

2 participants