Fix logger creating many thread locks when reloading the integrations page (#93768)
* Fix logger creating many thread locks We call getLogger for each integration to get the current log level when loading the integrations page. This creates a storm of threading locks * fixes
This commit is contained in:
parent
d8564eba17
commit
e4a15354f4
2 changed files with 11 additions and 2 deletions
|
@ -1,5 +1,4 @@
|
|||
"""Websocket API handlers for the logger integration."""
|
||||
import logging
|
||||
from typing import Any
|
||||
|
||||
import voluptuous as vol
|
||||
|
@ -16,6 +15,7 @@ from .helpers import (
|
|||
LogPersistance,
|
||||
LogSettingsType,
|
||||
async_get_domain_config,
|
||||
get_logger,
|
||||
)
|
||||
|
||||
|
||||
|
@ -38,7 +38,7 @@ def handle_integration_log_info(
|
|||
[
|
||||
{
|
||||
"domain": integration,
|
||||
"level": logging.getLogger(
|
||||
"level": get_logger(
|
||||
f"homeassistant.components.{integration}"
|
||||
).getEffectiveLevel(),
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue