Truncate MQTT payload in debug messages to 8kB (#45465)
This commit is contained in:
parent
eb339b9793
commit
0e068a5f39
1 changed files with 2 additions and 2 deletions
|
@ -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…
Add table
Reference in a new issue