Due to the MJPEG camera’s creating a significant amount of errors in the logs I want to disable logging for the camera component completely. There is a page in the documentation on logging that mentions below options and it seems you can set this per component (category). Does this include an option to completly disable logging or is critical the most restricted level already?
critical
fatal
error
warning
warn
info
debug
notset
well, you can introduce an entry in the loggin configuration like this:
homeassistant.components.sensor.camera: critical
It will filter all errors and show you anly those that are critical, for those … maybe you need to take a look what’s going on with that cam.
I use this for each component I include so when I feel something is going on I activate all, but while everything looks good just get those critical ones.
Unfortunately there is a known issue with MJPEG cameras due to a bug in urllib3. With 6 camera’s generating these errors continuously, it eats resources.
Yes, and the problem is within the library that HASS is using so unless that project fixes it, there’s nothing the HASS devs can do to eliminate it. There’s an issue raised in their github but it’s been open since Feb 2016.
Would it be worth a feature request? eg have a logging level that actually generates no logs for a component?
The good thing would be that you can actually keep using the component and are not dependent (at least short term) for someone outside the community to fix something.
Now it’s the MJPEG camera component (due to URLlib3) but tomorrow it could be anything else.
One on hand would be great to avoid any message related to a specific component. In this scenario would solve the issue, the.
On he other hand, at least for me ‘critical’ is the perfect one for a running environment as it will only log those issues that I really need to pay attention to…
So, if available perfect, otherwise I’ll continue with the ‘critical’ level.
I vote for this too.
It is really annoying to see the camera errors on the log file.
Something similar is happening to me when HA can’t connect to the dd-wrt router on the “Presence Detection” component.