From 7f766beb1cd846cb209a238879f634dcba602f99 Mon Sep 17 00:00:00 2001 From: Olivier Bilodeau Date: Fri, 31 May 2024 16:51:53 -0400 Subject: [PATCH] Clarified a confusing field name in JSON logs --- CHANGELOG.adoc | 1 + pyrdp/layer/tcp.py | 2 +- pyrdp/parser/rdp/fastpath.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index f9bb7292d..774d508a6 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -11,6 +11,7 @@ For a detailed view of what has changed, refer to the {uri-repo}/commits/master[ === Enhancements * Handles unknown NTSTATUS gracefully ({uri-issue}471[#471]) +* JSON logs field change: data becomes exceptionData == v2.1.0 - 2024-01-23 diff --git a/pyrdp/layer/tcp.py b/pyrdp/layer/tcp.py index 99460d19b..f4411a88e 100644 --- a/pyrdp/layer/tcp.py +++ b/pyrdp/layer/tcp.py @@ -104,7 +104,7 @@ def dataReceived(self, data: bytes): if isinstance(e, ParsingError): self.log.error("Parser information: %(parserInfo)s", {"parserInfo": e.formatLayer(len(e.layers) - 1)}) - self.log.error("Exception occurred when receiving: %(data)s" , {"data": hexlify(data).decode()}) + self.log.error("Exception occurred when receiving: %(exceptionData)s" , {"exceptionData": hexlify(data).decode()}) raise diff --git a/pyrdp/parser/rdp/fastpath.py b/pyrdp/parser/rdp/fastpath.py index 532821582..51201678c 100644 --- a/pyrdp/parser/rdp/fastpath.py +++ b/pyrdp/parser/rdp/fastpath.py @@ -90,7 +90,7 @@ def parseEvents(self, data: bytes) -> List[FastPathEvent]: except KeyboardInterrupt: raise except Exception: - log.error("Exception occurred when receiving: %(data)s", {"data": hexlify(eventData)}) + log.error("Exception occurred when receiving: %(exceptionData)s", {"exceptionData": hexlify(eventData)}) raise events.append(event)