fix(HEL-417): 配置根日志让影子对比报告落入容器日志

This commit is contained in:
总工
2026-09-02 21:53:19 +08:00
parent 5085cacf0d
commit 25ff6bbe06
2 changed files with 46 additions and 0 deletions
+12
View File
@@ -1,11 +1,23 @@
from __future__ import annotations
import argparse
import logging
from http.server import ThreadingHTTPServer
from typing import Any
def configure_logging() -> None:
"""让 INFO 级结构化日志(含 datahub 影子对比报告)落到容器日志。"""
if logging.getLogger().handlers:
return
logging.basicConfig(
level=logging.INFO,
format="%(asctime)s %(levelname)s %(name)s %(message)s",
)
def main(handler_class: type[Any] | None = None, service: Any | None = None) -> None:
configure_logging()
if handler_class is None or service is None:
from backend.application import RequestHandler, SERVICE