john30/ebusd

Separate log channel for device status

bobrippling opened this issue · 0 comments

Description

I'm happy to do the work, but want to confirm this approach is ok and would be accepted.

I notice a lot of bus errors appear (such as the SYN error below) and I would like to avoid them in my logs (using --log=bus:none):

[bus error] poll bai PrEnergySumHwc3 failed: ERR: SYN received

Unfortunately this solution (--log=bus:none) also silences two errors which I'd like to keep, namely:

[bus error] device status: eBUS comm error: overrun
[bus error] device status: transport closed

I would propose to move these two errors to a log facility, lf_device, to allow users to retain these errors, while ignoring regular SYN errors. What do you think?