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":