From 4c69fc4080887f498d957d3b3194b4c5c3ce7cb8 Mon Sep 17 00:00:00 2001 From: alemidev Date: Tue, 7 Dec 2021 17:24:26 +0100 Subject: [PATCH] better logging prefixes --- aiocraft/client.py | 2 +- aiocraft/dispatcher.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/aiocraft/client.py b/aiocraft/client.py index 2bebd42..209adce 100644 --- a/aiocraft/client.py +++ b/aiocraft/client.py @@ -85,7 +85,7 @@ class MinecraftClient(CallbacksHolder, Runnable): self._processing = False self._authenticated = False - self._logger = LOGGER.getChild(f"{self.host}:{self.port}") + self._logger = LOGGER.getChild(f"on({self.host}:{self.port})") @property def started(self) -> bool: diff --git a/aiocraft/dispatcher.py b/aiocraft/dispatcher.py index b5d479c..8e6635c 100644 --- a/aiocraft/dispatcher.py +++ b/aiocraft/dispatcher.py @@ -92,7 +92,7 @@ class Dispatcher: def _prepare(self, host:Optional[str] = None, port:Optional[int] = None, queue_timeout:int = 1, queue_size:int = 100): self._host = host or self._host or "localhost" self._port = port or self._port or 25565 - self._logger = LOGGER.getChild(f"@({self._host}:{self._port})") + self._logger = LOGGER.getChild(f"on({self._host}:{self._port})") self.encryption = False self.compression = None