mirror of
https://github.com/home-assistant/core.git
synced 2025-07-26 22:57:17 +00:00
Silence sisyphus chatty logging from dependencies (#66711)
This commit is contained in:
parent
2d2101528c
commit
011c645ee2
@ -29,19 +29,15 @@ CONFIG_SCHEMA = vol.Schema(
|
|||||||
{DOMAIN: vol.Any(AUTODETECT_SCHEMA, TABLES_SCHEMA)}, extra=vol.ALLOW_EXTRA
|
{DOMAIN: vol.Any(AUTODETECT_SCHEMA, TABLES_SCHEMA)}, extra=vol.ALLOW_EXTRA
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Silence these loggers by default. Their INFO level is super chatty and we
|
||||||
|
# only need error-level logging from the integration itself by default.
|
||||||
|
logging.getLogger("socketio.client").setLevel(logging.CRITICAL + 1)
|
||||||
|
logging.getLogger("engineio.client").setLevel(logging.CRITICAL + 1)
|
||||||
|
|
||||||
|
|
||||||
async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
|
async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
|
||||||
"""Set up the sisyphus component."""
|
"""Set up the sisyphus component."""
|
||||||
|
|
||||||
class SocketIONoiseFilter(logging.Filter):
|
|
||||||
"""Filters out excessively verbose logs from SocketIO."""
|
|
||||||
|
|
||||||
def filter(self, record):
|
|
||||||
if "waiting for connection" in record.msg:
|
|
||||||
return False
|
|
||||||
return True
|
|
||||||
|
|
||||||
logging.getLogger("socketIO-client").addFilter(SocketIONoiseFilter())
|
|
||||||
tables = hass.data.setdefault(DATA_SISYPHUS, {})
|
tables = hass.data.setdefault(DATA_SISYPHUS, {})
|
||||||
table_configs = config[DOMAIN]
|
table_configs = config[DOMAIN]
|
||||||
session = async_get_clientsession(hass)
|
session = async_get_clientsession(hass)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user