[Frontend] Add --log-level option to api server (#4377)

This commit is contained in:
Norman Mu 2024-04-25 22:36:01 -07:00 committed by GitHub
parent a74dee9b62
commit 2f30e7c72f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -100,6 +100,7 @@ if __name__ == "__main__":
type=str, type=str,
default=None, default=None,
help="FastAPI root_path when app is behind a path based routing proxy") help="FastAPI root_path when app is behind a path based routing proxy")
parser.add_argument("--log-level", type=str, default="debug")
parser = AsyncEngineArgs.add_cli_args(parser) parser = AsyncEngineArgs.add_cli_args(parser)
args = parser.parse_args() args = parser.parse_args()
engine_args = AsyncEngineArgs.from_cli_args(args) engine_args = AsyncEngineArgs.from_cli_args(args)
@ -110,7 +111,7 @@ if __name__ == "__main__":
uvicorn.run(app, uvicorn.run(app,
host=args.host, host=args.host,
port=args.port, port=args.port,
log_level="debug", log_level=args.log_level,
timeout_keep_alive=TIMEOUT_KEEP_ALIVE, timeout_keep_alive=TIMEOUT_KEEP_ALIVE,
ssl_keyfile=args.ssl_keyfile, ssl_keyfile=args.ssl_keyfile,
ssl_certfile=args.ssl_certfile, ssl_certfile=args.ssl_certfile,