homebridge-z2m icon indicating copy to clipboard operation
homebridge-z2m copied to clipboard

[Feature] Reduce volume of logs printed to Homebridge console

Open EdwardChamberlain opened this issue 2 years ago • 2 comments

Problem description Currently this plugin generates a large amount of entry into the logs page as every device interaction / message is logged. This can drown out critical issues (with other plugins) meaning they go undetected.

Suggested solution Add an option in config to change the log level for this plugin allowing device updates to be silenced.

Describe alternatives you've considered

Additional context

Are you willing to contribute to this feature? Yes.

EdwardChamberlain avatar Sep 14 '22 15:09 EdwardChamberlain

Just wondering: do you have debug logs (-D) turned on? If so, have you considered turning them off?

I don't have it turned on and the only thing I see from this plugin is whenever it publishes a message (which most of the time means that a user operated an accessory).

What logs would you want to get rid off?

itavero avatar Sep 14 '22 20:09 itavero

Just wondering: do you have debug logs (-D) turned on?

I dont have this on, so am not seeing debug logs.

I don't have it turned on and the only thing I see from this plugin is whenever it publishes a message (which most of the time means that a user operated an accessory).

These are the logs I am talking about here.

While this is limited to when messages are published, that still adds up to a huge number of logs (at least for me) as I have quite a few z2m devices, multiple people sending commands and a large number automations running regularly (motion sensors are particularly noisy as they can end up firing off 10 to 15 messages just walking around the house to turn lights on and off). This results in this plugin producing roughly 30x more logs than all other plugins put together. Unless I am checking the logs daily its easy to miss errors / issues / etc being posted.

It would be nice to have a way to suppress these publish messages and receive only critical / warning logs to help keep the log tidy and readable.

EdwardChamberlain avatar Sep 14 '22 20:09 EdwardChamberlain

I'll see if I can make it so that you can configure these logs to be part of the "Debug" messages rather than the "Info" level I believe they are currently on. Not sure when I have time to do so, but seems like a rather easy change.

itavero avatar Sep 25 '22 09:09 itavero

It appears that this issue did not have an update in quite some time. Please check if you can provide any additional information to help resolve this issue. If there isn't any activity in the next two weeks, this issue will be closed automatically. Thank you for your contributions!

stale[bot] avatar Oct 30 '22 15:10 stale[bot]

Hello, I'm using homebridge-z2m v1.9.2.

No matter the value, "log": {"mqtt_publish": "warn"} or "log": {"mqtt_publish": "error"}, I still have all the Publish to 'zigbee2mqtt/...../set': '{"state":"ON"}' log information.

Can you help me disabling this logs ?

Thank you

JacVid avatar Nov 26 '22 16:11 JacVid

This feature has not been released yet. I'll let you know when it's available.

itavero avatar Nov 26 '22 16:11 itavero

Just released v1.10.0 to homebridge-z2m@next which includes this feature. Because there were quite some internal changes, I haven't pushed it to latest yet. So far it seems to be working fine on my setup, but if you run into any issues, please do let me know.

itavero avatar Dec 09 '22 20:12 itavero