fix: douyin_fudai 关键路径异常添加日志

- run_id 生成失败时记录 logging.debug
- 日志系统初始化失败时记录 logging.warning,便于排查

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
CodexandClaude Opus 4.5 committed 2026-05-20 23:03:27 +08:00
1 parent 9bd10277b2
commit 92718a7cb4
1 file changed
+4 -3
+4 -3
View File
@@ -71,7 +71,8 @@ class fudai_analyse:
from datetime import datetime
self._run_id = datetime.now().strftime("%Y%m%d%H%M%S")
except Exception:
except Exception as e:
logging.debug("生成 run_id 失败,回退到时间戳: %s", e)
self._run_id = str(int(time.time()))
self._log_seq = 0
self._log_kv_orig = None
@@ -94,8 +95,8 @@ class fudai_analyse:
# 检查 _logging_configured 标志是否存在
if not getattr(douyin_logging, "_logging_configured", False):
douyin_logging.configure_logging()
except Exception:
pass
except Exception as e:
logging.warning("日志系统初始化失败: %s", e)
try:
from unified_logger import MDC, get_unified_logger