1
0
mirror of https://github.com/craigerl/aprsd.git synced 2024-12-21 17:11:01 -05:00

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

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}>)")