mirror of
https://framagit.org/framasoft/framaspace/argos.git
synced 2025-04-28 18:02:41 +02:00
Added logging option for the server command
This commit is contained in:
parent
bf24f87fd7
commit
0ea9ad4c6e
1 changed files with 4 additions and 1 deletions
|
@ -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)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue