-
Notifications
You must be signed in to change notification settings - Fork 1
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
Limit error reporting when repeater is offline #44
Comments
The trick is to find d a way to buffer log information while not making the log lag behind the actual event.... any chances I get access to your system for testing purposes? |
I can set you up for that, but I think you would need me available to start and stop the repeater(s) - I am not available for a couple of days though. Here is some psuedo code -- locate the line that is creating this log message. IF (messagecount < 5) THEN This should limit error messages from this sendto to 5 per hour. |
I will take this opportunity to add some behaviro driven testing to the logging stuff, thus I might only need you to test the branch on your actual system once it is done. |
I took a more general approach, the logs compares any incoming message with the previous one. Output looks like this:
The first message has been fired 9 times in total. |
Branch feature/LimitLog_#44 is ready for testing |
@johnhays
|
When an Icom repeater / controller is switched off, the log fills with reports, for example:
[2024-02-27 06:08:49] [ERROR ] Error returned from sendto (port: 20000), err: Network is unreachable
[2024-02-27 06:08:49] [ERROR ] Error returned from sendto (port: 20000), err: Network is unreachable
[2024-02-27 06:08:50] [ERROR ] Error returned from sendto (port: 20000), err: Network is unreachable
[2024-02-27 06:08:50] [ERROR ] Error returned from sendto (port: 20000), err: Network is unreachable
Please add code to limit the number of reports for a given incident (5?) and maybe make it a configuration parameter.
This can build very large log files in a short period of time.
The text was updated successfully, but these errors were encountered: