From 0ea9ad4c6ee5e71405ce36b7fa970590be4fc2bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexis=20M=C3=A9taireau?= Date: Wed, 18 Oct 2023 12:31:54 +0200 Subject: [PATCH] Added logging option for the server command --- argos/commands.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/argos/commands.py b/argos/commands.py index eabb079..9fac8e8 100644 --- a/argos/commands.py +++ b/argos/commands.py @@ -43,11 +43,14 @@ def agent(server, auth, max_tasks, wait_time, log_level): @click.option("--host", default="127.0.0.1", help="Host to bind") @click.option("--port", default=8000, type=int, help="Port to bind") @click.option("--reload", is_flag=True, help="Enable hot reloading") -def server(host, port, reload): +@click.option("--log-config", help="Path to the logging configuration file") +def server(host, port, reload, log_config): """Starts the server.""" command = ["uvicorn", "argos.server:app", "--host", host, "--port", str(port)] if reload: command.append("--reload") + if log_config: + command.extend(["--log-config", log_config]) subprocess.run(command)