Open rafaelcapucho opened 6 months ago
I tried to set the log-level, but it keeps printing [INFO] lines:
command: hypercorn --bind '0.0.0.0:5000' --reload --log-level=ERROR main:app
I also tried setting --access-logfile
to an empty value:
command: hypercorn --bind '0.0.0.0:5000' --reload --access-logfile= main:app
I think it is better (it works for me) to put all the hypercorn configuration in main, and then run it with python3 and redirect the stderr and stdout to /dev/null:
python3 main.py &>/dev/null
I think there is something odd here, unless you tell Hypercorn where to access log to (-
being sysout) it won't. Are you sure it is access logs?
The server printing to stdout every single request consuming a lot of resources inside the docker volume pretty fast, I would like to disable the Hypercorn output as much as possible, I tried using
> /dev/null
and2>&1 /dev/null
:but it fails saying that it isn't recognized by hypercorn:
I also tried
--access-logfile=/dev/null
but it didn't stop the printing to the stdout.Dockerfile: