mirror of
https://github.com/home-assistant/core.git
synced 2025-08-05 13:45:12 +02:00
Guard expensive debug logging with isEnabledFor in alexa (#100137)
This commit is contained in:
@@ -378,8 +378,9 @@ async def async_send_changereport_message(
|
|||||||
|
|
||||||
response_text = await response.text()
|
response_text = await response.text()
|
||||||
|
|
||||||
_LOGGER.debug("Sent: %s", json.dumps(message_serialized))
|
if _LOGGER.isEnabledFor(logging.DEBUG):
|
||||||
_LOGGER.debug("Received (%s): %s", response.status, response_text)
|
_LOGGER.debug("Sent: %s", json.dumps(message_serialized))
|
||||||
|
_LOGGER.debug("Received (%s): %s", response.status, response_text)
|
||||||
|
|
||||||
if response.status == HTTPStatus.ACCEPTED:
|
if response.status == HTTPStatus.ACCEPTED:
|
||||||
return
|
return
|
||||||
@@ -531,8 +532,9 @@ async def async_send_doorbell_event_message(
|
|||||||
|
|
||||||
response_text = await response.text()
|
response_text = await response.text()
|
||||||
|
|
||||||
_LOGGER.debug("Sent: %s", json.dumps(message_serialized))
|
if _LOGGER.isEnabledFor(logging.DEBUG):
|
||||||
_LOGGER.debug("Received (%s): %s", response.status, response_text)
|
_LOGGER.debug("Sent: %s", json.dumps(message_serialized))
|
||||||
|
_LOGGER.debug("Received (%s): %s", response.status, response_text)
|
||||||
|
|
||||||
if response.status == HTTPStatus.ACCEPTED:
|
if response.status == HTTPStatus.ACCEPTED:
|
||||||
return
|
return
|
||||||
|
Reference in New Issue
Block a user