Core: System Log ignores logger settings

Created on 18 Nov 2017  路  21Comments  路  Source: home-assistant/core

Make sure you are running the latest version of Home Assistant before reporting an issue.

You should only file an issue if you found a bug. Feature and enhancement requests should go in the Feature Requests section of our community forum:

Home Assistant release (hass --version):
0.58.0

Python release (python3 --version):
3.5.2

Component/platform:
System log

Description of problem:
Disabled some unwanted log entries in logger component, now they show up in the new Sytem Log. :-(
This spams this feature with unnecessary messages.
auswahl_051

Expected:
System Log should use logger settings or have it's own filters.

Problem-relevant configuration.yaml entries and steps to reproduce:

logger:
  default: warn
  logs:
    urllib3.connectionpool: fatal


    1. 2.
  1. 3.

Traceback (if applicable):


Additional info:
https://community.home-assistant.io/t/a-lot-of-warnings-for-cameras-aftere-upgrade/31973?u=vdrainer

To disable the System Log i used

system_log:
  max_entries: 0
waiting-for-reply

Most helpful comment

This was a design decision on my end as I wanted it to be possible to disable all logging, but still get warnings and errors in the log. I鈥檒l see if I can make a fix for the next release and add a flag to choose behavior.

All 21 comments

Experiencing the same issue on my system

Yes, it seems like the system_log component does not respect the logger settings.

@postlund

Same with me

This was a design decision on my end as I wanted it to be possible to disable all logging, but still get warnings and errors in the log. I鈥檒l see if I can make a fix for the next release and add a flag to choose behavior.

@postlund Any updates on the logger respecting the logger settings? Right now there are too many warnings that appear in the logs that can be safely ignored.

Unfortunately I haven't had any time to get working on this and it doesn't look any brighter right now. If I get any free time I'll give it a spin, but if someone wants to take on this task, feel free to do do!

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.

Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment :+1:

Still an issue with the current version

Same here!
I have the latest version of 0.64.3 on hassio but still keep getting a series of annoying Xiaomi vacuum errors although the vacuum component is working perfectly fine.
It seems whatever I set in the logger config is not affecting the logs.
Any hint for a temporary resolution until a fix comes in the next releases.

Maybe this component could be started like other components in HA, with system_log in the configuration.yaml and disabled by deleting the entry.
So everone can decide to use it?
For me it's absolute unusable.

I am with @VDRainer on this. Without the ability of filtering out entries, the logger is entirely unusable. If we are not going to fix it anytime soon, it will be nice to provide an option to users to revert back.

Same issue here!

A bit of a workaround for the error in the screenshot generating this log would be to change your urllib3 connectionpool.py to drop the logging from warning to debug level. This is a known bug in urllib3

I changed the file:

/srv/homeassistant/lib/python3.5/site-packages/urllib3/connectionpool.py

line 401:

log.warning( 'Failed to parse headers (url=%s): %s', self._absolute_url(url), hpe, exc_info=True)

to:

log.debug( 'Failed to parse headers (url=%s): %s', self._absolute_url(url), hpe, exc_info=True)

This stopped the millions of warning logs I was seeing from using my camera feed.

We should not allow filtering of logs. That puts the burden on the user. I think a more appropriate fix for this is grouping of exceptions that have already occurred and instead just report something like: Seen X times since . We could group by stack trace

I don't see an issue with allowing power users to filter logs (it already exists for the text-based log, just not the new system log). Especially when you have components or dependencies that spew out a ton of stack traces that can be safely ignored (I'm looking at you, urllib3). Being able to filter them out and not having them fill my database would be wonderful.

I do agree with updating the UI to only show the error once and then grouping them if there are multiple. But it would still be nice to have a way to filter/ignore them completely from certain components.

Looks like system_log also saves the errors in the database?
I think with errors like https://github.com/home-assistant/home-assistant/issues/13957, writing them to the log and also to the database, this is a SD Card killer.

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.

Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment :+1:

Still a problem, dev-info getting spammed with "Failed to parse headers".
Almost impossible to see real errors.

why not add a value to the logger to disable log of a certain component at all. is also a feature request on the community

We're not going to allow filtering logs as it means that we allow users to avoid problem instead of solving it. A patch to group errors is welcome.

Was this page helpful?
0 / 5 - 0 ratings