As a developer at multiple facilities I would like StreamDevice to reduce the amount of repeated log messages so that they don't take up unnecessary disk space/network usage. This is particularly bad when a timeout happens due to a disconnected device but can happen in various cases.
After discussion with @dirk-zimoch and @marciodo the following psuedocode solution was proposed:
If the record previously had no error then the error is printed and the error type and timestamp is saved for this record
If the record is still in the same error type and a user specified dead_time has not yet elapsed do not print and keep track of the number of errors
If the record is still in the same error type and the dead_time has elapsed print the error again, with how many errors were supressed in the dead_time
If the record comes out of error print how many errors were supressed and reset the error type to none
As a developer at multiple facilities I would like StreamDevice to reduce the amount of repeated log messages so that they don't take up unnecessary disk space/network usage. This is particularly bad when a timeout happens due to a disconnected device but can happen in various cases.
After discussion with @dirk-zimoch and @marciodo the following psuedocode solution was proposed:
dead_time
has not yet elapsed do not print and keep track of the number of errorsdead_time
has elapsed print the error again, with how many errors were supressed in thedead_time
Note that this is very similar to the work done in https://github.com/paulscherrerinstitute/StreamDevice/pull/39 but with the aim to: