-
Notifications
You must be signed in to change notification settings - Fork 912
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
suppress sequential identical messages #1309
Conversation
Please provide test coverage for the new feature. |
adding tests for new unique loggers
@dirk-thomas Tests added, tested locally with great success. Let me know if there are any further changes required. Sorry for the delay. |
kicking build farm |
@dirk-thomas build failures occuring appear unrelated to my pr. Is there a separate issue going on? |
Ignoring the Lunar CI result since this patch is now targeting |
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. |
Is this in a melodic release and did documentation ever get written? |
@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. |
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 ifa) the new message is not identical to previous message
or
b) throttle by period is set and throttle period has elapsed.