Remove not needed warning in Z-Wave (#136006)

* Remove unneeded logging

* ruff correction
This commit is contained in:
cdnninja 2025-01-20 18:25:53 -07:00 committed by GitHub
parent 24e6441806
commit ac59203279
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -154,16 +154,8 @@ async def async_enable_server_logging_if_needed(
LOGGER.info("Enabling zwave-js-server logging")
if (curr_server_log_level := driver.log_config.level) and (
LOG_LEVEL_MAP[curr_server_log_level]
) > (lib_log_level := LIB_LOGGER.getEffectiveLevel()):
) > LIB_LOGGER.getEffectiveLevel():
entry_data = entry.runtime_data
LOGGER.warning(
(
"Server logging is set to %s and is currently less verbose "
"than library logging, setting server log level to %s to match"
),
curr_server_log_level,
logging.getLevelName(lib_log_level),
)
entry_data[DATA_OLD_SERVER_LOG_LEVEL] = curr_server_log_level
await driver.async_update_log_config(LogConfig(level=LogLevel.DEBUG))
await driver.client.enable_server_logging()