Improve performance of http auth logging (#96464)

Avoid the argument lookups when debug logging is not enabled
This commit is contained in:
J. Nick Koston 2023-07-12 21:44:27 -10:00 committed by GitHub
parent 52c7ad130d
commit bc9b763688
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -224,7 +224,7 @@ async def async_setup_auth(hass: HomeAssistant, app: Application) -> None:
authenticated = True authenticated = True
auth_type = "signed request" auth_type = "signed request"
if authenticated: if authenticated and _LOGGER.isEnabledFor(logging.DEBUG):
_LOGGER.debug( _LOGGER.debug(
"Authenticated %s for %s using %s", "Authenticated %s for %s using %s",
request.remote, request.remote,