fix: 独立进程日志兜底 basicConfig(容器内可见性)
This commit is contained in:
@@ -88,6 +88,13 @@ def load_plugin_config(worker_type: str, config_dir: str = "config/workers") ->
|
||||
|
||||
def worker_serve():
|
||||
"""独立 Worker 进程入口(console script: chongming-worker / worker_serve)。"""
|
||||
# 独立进程不依赖网关的日志配置,兜底 basicConfig(已有 handler 时不覆盖)
|
||||
if not logging.getLogger().handlers:
|
||||
logging.basicConfig(
|
||||
level=logging.INFO,
|
||||
format="%(asctime)s - %(name)s - %(levelname)s - %(message)s",
|
||||
)
|
||||
|
||||
parser = argparse.ArgumentParser(description="chongming 独立 Worker 进程")
|
||||
parser.add_argument("--type", required=True, help="插件类型(如 demo / example)")
|
||||
parser.add_argument("--count", type=int, default=None, help="副本数(覆盖配置中的 count)")
|
||||
|
||||
Reference in New Issue
Block a user