From f81e7df71338a2882ee435de94eb641c30b47db9 Mon Sep 17 00:00:00 2001 From: Ales Teska Date: Tue, 15 Aug 2023 10:39:39 +0200 Subject: [PATCH] Fix. --- asab/log.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/asab/log.py b/asab/log.py index 5347c79c6..f7ab77965 100644 --- a/asab/log.py +++ b/asab/log.py @@ -448,8 +448,7 @@ def _on_write(self): while not self._queue.empty(): # TODO: Handle eventual error in writing -> break the cycle and restart on write handler - log_record = self._queue.get_nowait() - msg = log_record.getMessage().encode("utf-8") + msg = self._queue.get_nowait() self._socket.sendall(msg) @@ -480,7 +479,7 @@ def emit(self, record): self._enqueue(msg) else: - self._enqueue(record) + self._enqueue(msg) except Exception as e: