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

options to redirect stdout/stderr in gunicorn logging #1271

Closed
benoitc opened this Issue May 18, 2016 · 5 comments

Comments

Projects
None yet
3 participants
@benoitc
Owner

benoitc commented May 18, 2016

following a discussion on twitter, I would like to rediscuss having an option to redtirect stdout/stderr to our logs:

screen shot 2016-05-18 at 13 29 17

This behaviour has been removed in 4152318 3 years ago. But rediscussed last year and now.

I think we could have a --capture-stdio option that would allows it. Thoughts?

@JohnSpeno

This comment has been minimized.

Show comment
Hide comment
@JohnSpeno

JohnSpeno May 19, 2016

I love this idea. I was going to propose it myself after struggling with trying to get Django to have its stderr show up in gunicorn's error.log. I was just about to ask about it on the mailing list, but it seems that lists.gunicorn.org is dead.

So yeah, there should be a way to get stdout and stderr from the wsgi app sent to the same places that gunicorn uses for its error logging etc. In this way, it will be like the old days of CGI scripts sending their output to apache log files. :)

JohnSpeno commented May 19, 2016

I love this idea. I was going to propose it myself after struggling with trying to get Django to have its stderr show up in gunicorn's error.log. I was just about to ask about it on the mailing list, but it seems that lists.gunicorn.org is dead.

So yeah, there should be a way to get stdout and stderr from the wsgi app sent to the same places that gunicorn uses for its error logging etc. In this way, it will be like the old days of CGI scripts sending their output to apache log files. :)

@tilgovi

This comment has been minimized.

Show comment
Hide comment
@tilgovi

tilgovi May 20, 2016

Collaborator

It does seem to be causing a lot of confusion. I've answered now a post on SO and I think several questions on our issue tracker about missing log messages.

Collaborator

tilgovi commented May 20, 2016

It does seem to be causing a lot of confusion. I've answered now a post on SO and I think several questions on our issue tracker about missing log messages.

@tilgovi

This comment has been minimized.

Show comment
Hide comment
@tilgovi

tilgovi May 20, 2016

Collaborator

Making it opt-in seems the best idea.

Collaborator

tilgovi commented May 20, 2016

Making it opt-in seems the best idea.

benoitc added a commit that referenced this issue May 20, 2016

redtirect stdio/stderr to logfile
Add the new setting `--caapture-stdio` to capture output from stdio/stderr to the current log file.

fix #1271
@benoitc

This comment has been minimized.

Show comment
Hide comment
@benoitc

benoitc May 20, 2016

Owner

@JohnSpeno @tilgovi see the PR above. Should fix the issue. Let me know.

Owner

benoitc commented May 20, 2016

@JohnSpeno @tilgovi see the PR above. Should fix the issue. Let me know.

benoitc added a commit that referenced this issue May 21, 2016

redtirect stdout/stderr to logfile
Add the new setting `--caapture-output` to capture output from stdout/stderr to the current log file.

fix #1271

@benoitc benoitc closed this in #1276 May 21, 2016

@JohnSpeno

This comment has been minimized.

Show comment
Hide comment
@JohnSpeno

JohnSpeno May 24, 2016

Looks good to me. Thank you.

JohnSpeno commented May 24, 2016

Looks good to me. Thank you.

fofanov pushed a commit to fofanov/gunicorn that referenced this issue Mar 16, 2018

redtirect stdout/stderr to logfile
Add the new setting `--caapture-output` to capture output from stdout/stderr to the current log file.

fix #1271
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment