joshuar / go-hass-agent

A Home Assistant, native app for desktop/laptop devices.
MIT License
135 stars 11 forks source link

[FEATURE REQUEST] Reduce log spam #236

Open fdw opened 1 month ago

fdw commented 1 month ago

Is your feature request related to a problem? Please describe. go-hass-agent writes to the syslog every time it can't update a sensor; which can be very often if the sensor is disabled. I'd like to reduce the size of the log.

Describe the solution you'd like Can it, for example, only log the first time it can't update a sensor? Or at least a lot less often?

Describe alternatives you've considered I could enable the sensor, but I don't need the data in HA, and I don't want to save it there.

joshuar commented 4 weeks ago

Hey thanks for reporting. I agree, that is excessive. In the current code, a major re-write of the logging code has happened and I can confirm the agent no longer spams the log about disabled sensors. So this will be a non-issue in the next release :tada:

I'll leave this issue open until the release drops as a reminder.

fdw commented 3 weeks ago

While it is much better, I still get a regular log entry: Errors fetching some chip/sensor values from hwmon API. worker=hwmon_sensors errors="some errors encountered while processing hwmon directory: some errors encountered while processing sensor files: could not read contents of file: read /sys/class/hwmon/hwmon1/of_node: is a directory"

joshuar commented 1 week ago

Thanks for reporting this. I'm hoping v10.1.1 has fixed this hwmon logging spam. Please keep the feedback coming if you feel there are log messages you don't find useful!

fdw commented 5 days ago

Looks a lot better now, thanks 🙂

I still get a regular mention of WRN Unable to retrieve sensors. worker=abrt_problems_sensor worker_type=polling error="could not retrieve list of problems from D-Bus: error getting data: SystemBus: unable to get data org.freedesktop.problems.GetProblems from org.freedesktop.problems 😉