redirect80: CLI 标准化(argparse + log_client 级别过滤)
- 新增 --host/--port/--redirect-port/--redirect-code CLI 参数(覆盖 confs+ENV) - 新增 --log-level debug|info|warn|error(log_client 加级别过滤) - 新增 --instance 实例名(注册中心用) - 自定义 --help 用法文本(argparse,confs 不可用时也能 --help) - log_client: 新增 set_log_level() + push() 级别过滤 - 修复: redirect_code 配置项原加载但未使用,do_GET/do_HEAD 改为用 _config['redirect_code'] - 配置优先级: CLI > ENV > confs > 默认值 - services.yaml: redirect80 声明 --instance 和 --log-level
This commit is contained in:
1 parent
01c6d0cb1f
commit
4275f002e0
3 files changed
+150
-53
No files matched your search
+1
-1
@@ -104,6 +104,6 @@ services:
|
||||
# --- 端口重定向(最后启动) ---
|
||||
- name: redirect80
|
||||
cmd: bash /opt/micro_servers/redirect80/_run.sh
|
||||
args: []
|
||||
args: ["--instance", "redirect80", "--log-level", "info"]
|
||||
depends_on: [waf]
|
||||
sleep_before: 0
|
||||
Reference in new issue
Block a user