Show comment in multiline packet output

This patch adds the comment for a packet if it exists
in the multiline log output
This commit is contained in:
Hemna 2024-03-23 13:00:51 -04:00
parent c581dc5020
commit f4356e4a20
1 changed files with 4 additions and 0 deletions

View File

@ -60,6 +60,10 @@ def log_multiline(packet, tx: Optional[bool] = False, header: Optional[bool] = T
msg = msg.replace("<", "\\<")
logit.append(f" Info : <light-yellow><b>{msg}</b></light-yellow>")
if hasattr(packet, "comment") and packet.comment:
logit.append(f" Comment : {packet.comment}")
raw = packet.raw.replace("<", "\\<")
logit.append(f" Raw : <fg #828282>{raw}</fg #828282>")
logit.append(f"{header_str}________(<{PACKET_COLOR}>{name}</{PACKET_COLOR}>)")