mirror of
https://github.com/home-assistant/core
synced 2024-07-24 16:42:06 +02:00
Truncate MQTT payload in debug messages to 8kB (#45465)
This commit is contained in:
parent
eb339b9793
commit
0e068a5f39
@ -865,7 +865,7 @@ class MQTT:
|
||||
"Received message on %s%s: %s",
|
||||
msg.topic,
|
||||
" (retained)" if msg.retain else "",
|
||||
msg.payload,
|
||||
msg.payload[0:8192],
|
||||
)
|
||||
timestamp = dt_util.utcnow()
|
||||
|
||||
@ -880,7 +880,7 @@ class MQTT:
|
||||
except (AttributeError, UnicodeDecodeError):
|
||||
_LOGGER.warning(
|
||||
"Can't decode payload %s on %s with encoding %s (for %s)",
|
||||
msg.payload,
|
||||
msg.payload[0:8192],
|
||||
msg.topic,
|
||||
subscription.encoding,
|
||||
subscription.job,
|
||||
|
Loading…
Reference in New Issue
Block a user