home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.64k stars 30.79k forks source link

homeassistant.loader logger severity ignored #21745

Closed luca-angemi closed 5 years ago

luca-angemi commented 5 years ago

Home Assistant release with the issue: 0.88

Last working Home Assistant release (if known): 0.87

Operating environment (Hass.io/Docker/Windows/etc.): hassbian

Component/platform: logger

Description of problem: the logger severity for the component homeassistant.loader is ignored.

Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):

logger:
  default: warning
  logs:
    homeassistant.loader: error

Traceback (if applicable):

2019-03-07 15:12:27 WARNING (MainThread) [homeassistant.loader] You are using a custom component for telegram_bot which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant.

Additional information:

awarecan commented 5 years ago

Did you put your telegram_bot config in a separate yaml file?

I am asking that because the configuration file merge happened in pretty early stage of bootstrap, before the logger component got loaded.

If you put your telegram_bot config in the configuration.yaml, I bet you won't see that warning log, since the logger component will be loaded along with other important build-in component before other integration components.

luca-angemi commented 5 years ago

Thanks.

It is actually in configuration.yaml with other custom components, all popping up in homeassistant.loader logger as warnings.

awarecan commented 5 years ago

Yes, you are right. After merge package, before actual load component, there is another code will trigger the custom component warning which is resolving component dependency.

In short, there is no quick way to resolve your issue. If you really want to hide those messages, you can try to set the default logger level in bootstrap phase to logging.ERROR by change this code https://github.com/home-assistant/home-assistant/blob/dfd9f7ccf3ae3e25280529c500b43acfaad1f77b/homeassistant/bootstrap.py#L359

luca-angemi commented 5 years ago

Many thanks for your quick help Jason.

mu3 commented 5 years ago

In my case (HA 0.93) severity is absolutely ignored.

logger:
  default: critical

Calling logger.set_level and logger.set_default_level with payload {"level":"fatal"} has zero effect:

Screen Shot 2019-04-11 at 16 13 06

Such a SD card killer :(

Another problem is that suddenly I started to get tons of errors with no visible reason, and restarting HA or HassOS doesn't help. Is there some quick fix like force reinstall dependencies or such?

Hooch76 commented 5 years ago

Same here. I am on 0.94.1 and no longer able to change the log level.

johntdyer commented 5 years ago

I am having the same issue on Hassio version 0.93.1, rather frustrating

Hooch76 commented 5 years ago

See https://community.home-assistant.io/t/logger-set-level/14267 I have had success no longer using set_level but set_default_level

johntdyer commented 5 years ago

I am not seeing the same on my system, I am using set_default_level and still get http logs

awarecan commented 5 years ago

@mu3 @Hooch76 @johntdyer your issues are not same as OP's. Please create new issue and follow our issue template. If you want get more timely support, please go to our forum or discord channel.

I am going to close this issue since OP's issue specific about loader's log, and we have partially addressed it in #21799

SelcouthGuy commented 5 years ago

Hello @awarecan Looks like problem still exist. I have logger for imap set to error but as you see below, there is also warning in logs. Hassbian 0.99 on RPI3B+. On previous release I've noted same problem.

Lost imap.gmail.com (will attempt to reconnect)
12:17 AM components/imap/sensor.py (WARNING)
logger:
  default: info
  logs:
    homeassistant.components.websocket_api: info
    homeassistant.components.wwlln: debug
    homeassistant.components.duckdns: debug
    homeassistant.components.imap: error

Is there any chance for fix this issue? Thank you very much in advance for your answer. Best regards.

edit: just received another occurence and the strange thing is that I can see this warning in HA UI Logs viewer (/developer-tools/logs) but I dont see it in home-assistant.log file. imap_set_to_error

2019-09-20 11:00:47 DEBUG (MainThread) [homeassistant.components.wwlln.geo_location] Refreshing WWLLN data
2019-09-20 11:00:48 DEBUG (MainThread) [homeassistant.components.wwlln.geo_location] Going to remove set()
2019-09-20 11:00:48 DEBUG (MainThread) [homeassistant.components.wwlln.geo_location] Going to create set()
2019-09-20 11:10:48 DEBUG (MainThread) [homeassistant.components.wwlln.geo_location] Refreshing WWLLN data
2019-09-20 11:10:49 DEBUG (MainThread) [homeassistant.components.wwlln.geo_location] Going to remove set()
2019-09-20 11:10:49 DEBUG (MainThread) [homeassistant.components.wwlln.geo_location] Going to create set()
2019-09-20 11:20:49 DEBUG (MainThread) [homeassistant.components.wwlln.geo_location] Refreshing WWLLN data
kariudo commented 1 year ago

@mu3 @Hooch76 @johntdyer your issues are not same as OP's. Please create new issue and follow our issue template. If you want get more timely support, please go to our forum or discord channel.

I am going to close this issue since OP's issue specific about loader's log, and we have partially addressed it in #21799

21799 seems to state specifically that it does not fix the issue described here, this issue still persists.

In the simplest case there is no way to squelch the warnings that are emitted by homeassistant.loader regarding custom components being loaded.

2022-12-15 16:54:26.827 WARNING (SyncWorker_3) [homeassistant.loader] We found a custom integration smartir which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-12-15 16:54:26.830 WARNING (SyncWorker_3) [homeassistant.loader] We found a custom integration senseme which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-12-15 16:54:26.831 WARNING (SyncWorker_3) [homeassistant.loader] We found a custom integration hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-12-15 16:54:26.832 WARNING (SyncWorker_3) [homeassistant.loader] We found a custom integration mail_and_packages which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-12-15 16:54:26.835 WARNING (SyncWorker_3) [homeassistant.loader] We found a custom integration bhyve which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-12-15 16:54:26.836 WARNING (SyncWorker_3) [homeassistant.loader] We found a custom integration kodi_media_sensors which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-12-15 16:54:26.841 WARNING (SyncWorker_3) [homeassistant.loader] We found a custom integration simple_wyze_vac which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-12-15 16:54:26.842 WARNING (SyncWorker_3) [homeassistant.loader] We found a custom integration govee which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-12-15 16:54:26.845 WARNING (SyncWorker_3) [homeassistant.loader] We found a custom integration alexa_media which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-12-15 16:54:26.846 WARNING (SyncWorker_3) [homeassistant.loader] We found a custom integration sonarr_upcoming_media which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-12-15 16:54:26.847 WARNING (SyncWorker_3) [homeassistant.loader] We found a custom integration wyzeapi which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-12-15 16:54:26.847 WARNING (SyncWorker_3) [homeassistant.loader] We found a custom integration powercalc which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-12-15 16:54:26.849 WARNING (SyncWorker_3) [homeassistant.loader] We found a custom integration blitzortung which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-12-15 16:54:26.852 WARNING (SyncWorker_3) [homeassistant.loader] We found a custom integration plex_assistant which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-12-15 16:54:26.853 WARNING (SyncWorker_3) [homeassistant.loader] We found a custom integration ytube_music_player which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-12-15 16:54:26.855 WARNING (SyncWorker_3) [homeassistant.loader] We found a custom integration microsoft_todo which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-12-15 16:54:26.857 WARNING (SyncWorker_3) [homeassistant.loader] We found a custom integration webrtc which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-12-15 16:54:26.858 WARNING (SyncWorker_3) [homeassistant.loader] We found a custom integration mass which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-12-15 16:54:26.859 WARNING (SyncWorker_3) [homeassistant.loader] We found a custom integration edgeos which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant

with configuration:

logger:
  default: error
  logs:
    homeassistant.loader: error 
    homeassistant.core: error

While it is hardly the end of the world, its unnecessary log writing that the configuration does not seem to support disabling short of modifying the .py files of course.

maslyankov commented 1 year ago

The issue still persists... :/