Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Reduce volume of logs printed to Homebridge console #518

Closed
EdwardChamberlain opened this issue Sep 14, 2022 · 7 comments
Closed
Labels
enhancement New feature or request stale

Comments

@EdwardChamberlain
Copy link

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 EdwardChamberlain added the enhancement New feature or request label Sep 14, 2022
@itavero
Copy link
Owner

itavero commented Sep 14, 2022

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?

@EdwardChamberlain
Copy link
Author

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.

@itavero
Copy link
Owner

itavero commented Sep 25, 2022

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.

@stale
Copy link

stale bot commented Oct 30, 2022

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 stale bot added the stale label Oct 30, 2022
@stale stale bot closed this as completed Nov 21, 2022
@JacVid
Copy link

JacVid commented Nov 26, 2022

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

@itavero
Copy link
Owner

itavero commented Nov 26, 2022

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

@itavero
Copy link
Owner

itavero commented Dec 9, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request stale
Projects
None yet
Development

No branches or pull requests

3 participants