优化日志级别,生产环境中INFO避免打印过多日志

This commit is contained in:
Chingfeng Li
2025-11-11 18:52:14 +08:00
parent cbb74170ea
commit 833f379aa1
10 changed files with 46 additions and 46 deletions
@@ -101,7 +101,7 @@ class ASRProviderBase(ABC):
self.speech_to_text(asr_audio_task, conn.session_id, conn.audio_format)
)
end_time = time.monotonic()
logger.bind(tag=TAG).info(f"ASR耗时: {end_time - start_time:.3f}s")
logger.bind(tag=TAG).debug(f"ASR耗时: {end_time - start_time:.3f}s")
return result
finally:
loop.close()
@@ -158,7 +158,7 @@ class ASRProviderBase(ABC):
# 性能监控
total_time = time.monotonic() - total_start_time
logger.bind(tag=TAG).info(f"总处理耗时: {total_time:.3f}s")
logger.bind(tag=TAG).debug(f"总处理耗时: {total_time:.3f}s")
# 检查文本长度
text_len, _ = remove_punctuation_and_length(raw_text)