1
0

fix: 增加日志

This commit is contained in:
2025-12-15 15:39:05 +08:00
parent 9b2d13ce25
commit 3ac3c89566
51 changed files with 635 additions and 1992 deletions

View File

@@ -6,7 +6,16 @@
import os
import pathlib
import playsound
from heurams.services.logger import get_logger
logger = get_logger(__name__)
def play_by_path(path: pathlib.Path):
playsound.playsound(str(path))
logger.debug("playsound_audio.play_by_path: 开始播放 %s", path)
try:
playsound.playsound(str(path))
logger.debug("播放完成: %s", path)
except Exception as e:
logger.error("播放失败: %s, 错误: %s", path, e)
raise