mirror of
https://github.com/home-assistant/core.git
synced 2026-09-26 01:11:51 -04:00
Truncate MQTT payload in debug messages to 8kB (#45465)
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user