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

suppress sequential identical messages #1309

Merged

Conversation

davelkan-zz
Copy link
Contributor

Frequently nodes will spam messages that unhelpfully fill up logs. recently throttling by period was added to python to help reduce this spam, but sometimes simply throttling by period will suppress new information when your log is not static. I am proposing the inclusion of a throttler that will filter out identical sequential messages to help reduce log spam when desired.

the LoggingIdentical class is set up similarly to existing LoggingThrottle class and plays nicely with throttling by period. Filtering out sequential identical logs is triggered by setting kwarg logger_throttle_identical to true. When this flag is set a given log will publish if
a) the new message is not identical to previous message
or
b) throttle by period is set and throttle period has elapsed.

@dirk-thomas
Copy link
Member

Please provide test coverage for the new feature.

@davelkan-zz
Copy link
Contributor Author

davelkan-zz commented Apr 17, 2018

@dirk-thomas Tests added, tested locally with great success. Let me know if there are any further changes required. Sorry for the delay.

@davelkan-zz davelkan-zz closed this May 2, 2018
@davelkan-zz davelkan-zz reopened this May 2, 2018
@davelkan-zz
Copy link
Contributor Author

kicking build farm

@davelkan-zz
Copy link
Contributor Author

@dirk-thomas build failures occuring appear unrelated to my pr. Is there a separate issue going on?

@dirk-thomas dirk-thomas changed the base branch from lunar-devel to melodic-devel May 18, 2018 22:10
@dirk-thomas
Copy link
Member

Ignoring the Lunar CI result since this patch is now targeting melodic-devel.

@dirk-thomas
Copy link
Member

Thank you for the patch. Please add documentation to the wiki page for this new feature and post a link to the changes here for future readers to find it.

@dirk-thomas dirk-thomas merged commit 60be250 into ros:melodic-devel May 18, 2018
@leviathan747
Copy link

Is this in a melodic release and did documentation ever get written?

@dirk-thomas
Copy link
Member

@leviathan747 When you click on the above merge commit 60be250 you will see that it has been released as of 1.14.0 (which was around May 2018).

I will let @davelkan respond to the documentation question.

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

Successfully merging this pull request may close these issues.

4 participants