Skip to content
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

simplify the logging ? #591

Closed
benoitc opened this issue Aug 9, 2013 · 2 comments · Fixed by #673
Closed

simplify the logging ? #591

benoitc opened this issue Aug 9, 2013 · 2 comments · Fixed by #673
Milestone

Comments

@benoitc
Copy link
Owner

benoitc commented Aug 9, 2013

At this point I am not sure we are doing the logging right. Gunicorn log options should only be used for gunicorn purpose and we shouldn't be doing more than that.

ie. :

  • we shouldn't try to redirect stderr/stdin to any log file
  • error.log and syslog should only display errors catched in gunicorn.

Thoughts?

@danc86
Copy link
Contributor

danc86 commented Aug 22, 2013

+1 to this. In my opinion if the application wants to configure logging it should do so itself, not through gunicorn. And gunicorn should keep its own logs from leaking to the application by setting propagate=False (#597).

I would go one further and say that gunicorn shouldn't bother writing log files at all -- write errors (ones which are handled within gunicorn) to stderr, and (optionally) write access logs to stdout. If people are running gunicorn in production they should be using a supervisor like systemd which can redirect stdout/stderr to the desired place. Not sure how many gunicorn users would agree with that though.

@avaitla
Copy link
Contributor

avaitla commented Dec 6, 2013

+1 as well to at least making propagate=False. This issue might be relevant as well #574

benoitc added a commit that referenced this issue Dec 27, 2013
Partly fix #591. Gunicorn should only bother writing its own log and let
the application handle the way it want to log its own errors.

By removing the log_file option we are making sure that someone won't
attempt to use gunicorn to do more whn it's about logging. also we are
making sure that the logs options are not overriden.
@benoitc benoitc mentioned this issue Dec 27, 2013
benoitc added a commit that referenced this issue Dec 27, 2013
Logging to a logfile should be explicit and gunicorn should not try to
be smarter here. Partially fix #591
benoitc added a commit that referenced this issue Jan 1, 2014
Partly fix #591. Gunicorn should only bother writing its own log and let
the application handle the way it want to log its own errors.

By removing the log_file option we are making sure that someone won't
attempt to use gunicorn to do more whn it's about logging. also we are
making sure that the logs options are not overriden.
benoitc added a commit that referenced this issue Jan 1, 2014
Logging to a logfile should be explicit and gunicorn should not try to
be smarter here. Partially fix #591
@benoitc benoitc closed this as completed in 57cb4ac Jan 1, 2014
benoitc added a commit that referenced this issue Jan 1, 2014
Logging to a logfile should be explicit and gunicorn should not try to
be smarter here. Partially fix #591
NelsonMinar added a commit to NelsonMinar/vector-river-map that referenced this issue Dec 2, 2014
Gunicorn used to log to stderr by default but that changed in December 2013.
benoitc/gunicorn#591
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants