digitaltrails / vdu_controls

VDU controls - a control panel for monitor brightness/contrast/...
GNU General Public License v3.0
103 stars 4 forks source link

Reduce message logging by tracking errors against individual VDU's #47

Closed digitaltrails closed 1 year ago

digitaltrails commented 1 year ago

Reduce the number of logged messages by attributing errors to individual VDU's. At the moment we can get into a situation where one VDU is working and another is not, which leads to a sequence such as:

LuxAutoWorker: Brightness error on XYZ, will sleep and try again.
LuxAutoWorker: DDC command succeeded after 1 consecutive errors.
LuxAutoWorker: Brightness error on XYZ, will sleep and try again.
LuxAutoWorker: DDC command succeeded after 1 consecutive errors.
...

It would be good if this use-case behaved more like the situation where all ddcutil commands were failing and only report back when progress has been made:

LuxAutoWorker: multiple errors count=2, sleeping and retrying.
LuxAutoWorker: DDC command succeeded after 15 consecutive errors.

At the same time some consideration should be given to what errors should be counted, such as getvcp/getvcp, and what info should be logged, such as what DDC command succeeded.

Whatever is done, simplicity should be preferred, this is not a big deal.

digitaltrails commented 1 year ago

Included in v1.10.2