-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gunicorn doesn't print access log to stdout/stderr #1400
Comments
I'm using Gunicorn with Amazon ECS and |
closing issue as "work as documented". Feel free to open a new one if you want to discuss a possible change of the current behaviour. |
Hi! I hope this is the proper place to ask about it; I'm using gunicorn (v19.7.1) and failing at finding logs in stdoutput. The command, as I understand the documentation is:
Then, when I make any http request to the application I cannot see any log in the gunicorn terminal (although the application is responding properly to the request). Am I using gunicorn wrong? Could anyone provide a hint? Thanks in advance!! |
@yamila-moreno I just tried the command you pasted with $ gunicorn -b 0.0.0.0:6007 --access-logfile - --error-logfile - --log-level debug test:app
[2018-03-22 17:42:29 +0300] [24642] [DEBUG] Current configuration:
[...snipped...]
[2018-03-22 17:42:29 +0300] [24642] [INFO] Starting gunicorn 19.7.1
[2018-03-22 17:42:29 +0300] [24642] [DEBUG] Arbiter booted
[2018-03-22 17:42:29 +0300] [24642] [INFO] Listening at: http://0.0.0.0:6007 (24642)
[2018-03-22 17:42:29 +0300] [24642] [INFO] Using worker: sync
[2018-03-22 17:42:29 +0300] [24645] [INFO] Booting worker with pid: 24645
[2018-03-22 17:42:29 +0300] [24642] [DEBUG] 1 workers
[2018-03-22 17:42:32 +0300] [24645] [DEBUG] GET /
127.0.0.1 - - [22/Mar/2018:17:42:32 +0300] "GET / HTTP/1.1" 200 14 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.112 Safari/537.36"
[2018-03-22 17:42:33 +0300] [24645] [DEBUG] GET /favicon.ico
127.0.0.1 - - [22/Mar/2018:17:42:33 +0300] "GET /favicon.ico HTTP/1.1" 200 14 "http://0.0.0.0:6007/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.112 Safari/537.36"
[2018-03-22 17:42:39 +0300] [24645] [DEBUG] GET /
127.0.0.1 - - [22/Mar/2018:17:42:39 +0300] "GET / HTTP/1.1" 200 14 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.112 Safari/537.36"
[2018-03-22 17:42:40 +0300] [24645] [DEBUG] GET /favicon.ico
127.0.0.1 - - [22/Mar/2018:17:42:40 +0300] "GET /favicon.ico HTTP/1.1" 200 14 "http://0.0.0.0:6007/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.112 Safari/537.36" |
@berkerpeksag thanks for your answer. I was hoping I just misunderstood the documentation. At least I can stop looking there, and find the error in another place. When (if) I finally find the solution, I'll paste here, so it may be useful for someone. |
@berkerpeksag sorry for bothering with this, but could you paste also the first part of your gunicorn command? the part "...snipped..."; I'd like to check if there is anything different that I could use as a hint. thanks!! |
Here it is:
|
Hi there!! @berkerpeksag thanks for your help. I realised that the problem was the configuration with the logging package. |
@berkerpeksag @benoitc Hey guys, is there a way to disable the current configuration from being printed out when on DEBUG log level? (similar to the snipped section above). |
FYI, if you use |
@dave4jr nope, why? |
@romabysen interesting. Do you still have the command? I'm using the container with my gunicorn in ecs, and I have a startup.sh in docker file with this command to start the server, but it's not delivering the log to stdout. This is my dockerfile: This is the server : |
@msoedov did you find the solution to print the log in stdout using the containerized gunicorn? |
Yes using |
I'm using containerized gunicorn process which I run by:
However I did manage to find an easy way in the docs how to make it print access log to stdout.
--access-logfile
-
doesn't work as it documented on http://docs.gunicorn.org/en/stable/settings.html#accesslogConfig for
gunicorn==19.6.0
The text was updated successfully, but these errors were encountered: