XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet
公开
关注 0 Fork 0 Star 0
返回提交历史

XFEstudio/gpt4free

Add --access-log and --no-access-log CLI parameters for access logging control

Co-authored-by: hlohaus <983577+hlohaus@users.noreply.github.com>

7b576558
copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
提交于

代码差异

1 个文件 +3 -0
Modified g4f/cli/__init__.py +3 -0
@@ -158,6 +158,8 @@ def get_api_parser() -> ArgumentParser:
158 158 api_parser.add_argument("--ssl-keyfile", type=str, default=None, help="SSL key file.")
159 159 api_parser.add_argument("--ssl-certfile", type=str, default=None, help="SSL cert file.")
160 160 api_parser.add_argument("--log-config", type=str, default=None, help="Path to log config.")
161 api_parser.add_argument("--access-log", action="store_true", default=True, help="Enable access logging.")
162 api_parser.add_argument("--no-access-log", dest="access_log", action="store_false", help="Disable access logging.")
161 163
162 164 api_parser.add_argument(
163 165 "--browser-port",
@@ -219,6 +221,7 @@ def run_api_args(args):
219 221 ssl_keyfile=args.ssl_keyfile,
220 222 ssl_certfile=args.ssl_certfile,
221 223 log_config=args.log_config,
224 access_log=args.access_log,
222 225 )
223 226
224 227