From cfcb6cb97d5308e6051eb7590f1b3ede0a8e96a6 Mon Sep 17 00:00:00 2001 From: kalicyh <34980061+kaliCYH@users.noreply.github.com> Date: Tue, 18 Feb 2025 00:45:54 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20fix(log):=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/auth.py | 1 + core/connection.py | 2 +- core/handle/audioHandle.py | 1 - 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/auth.py b/core/auth.py index 8aaa4f00..ef643132 100755 --- a/core/auth.py +++ b/core/auth.py @@ -1,6 +1,7 @@ from config.logger import setup_logging TAG = __name__ +logger = setup_logging() class AuthenticationError(Exception): diff --git a/core/connection.py b/core/connection.py index ab5d3957..d2645ba3 100644 --- a/core/connection.py +++ b/core/connection.py @@ -96,7 +96,7 @@ class ConnectionHandler: # Load private configuration if device_id is provided bUsePrivateConfig = self.config.get("use_private_config", False) - self.info(f"bUsePrivateConfig: {bUsePrivateConfig}, device_id: {device_id}") + self.logger.bind(tag=TAG).info(f"bUsePrivateConfig: {bUsePrivateConfig}, device_id: {device_id}") if bUsePrivateConfig and device_id: try: self.private_config = PrivateConfig(device_id, self.config, self.auth_code_gen) diff --git a/core/handle/audioHandle.py b/core/handle/audioHandle.py index 8d8d37ad..394e7fe5 100644 --- a/core/handle/audioHandle.py +++ b/core/handle/audioHandle.py @@ -10,7 +10,6 @@ logger = setup_logging() async def handleAudioMessage(conn, audio): if not conn.asr_server_receive: - logger = setup_logging() logger.bind(tag=TAG).debug(f"前期数据处理中,暂停接收") return if conn.client_listen_mode == "auto":