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

Set global logging configuration from a Paste config. #809

Merged
merged 1 commit into from
Jul 26, 2014
Merged

Set global logging configuration from a Paste config. #809

merged 1 commit into from
Jul 26, 2014

Conversation

berkerpeksag
Copy link
Collaborator

Since gunicorn.app.pasterapp.{run, paste_server} are deprecated,
there is no way to configure the logging module from a Paste config
file.

Since gunicorn.app.pasterapp.{run, paste_server} are deprecated,
there is no way to configure the logging module from a Paste config
file.
@tilgovi
Copy link
Collaborator

tilgovi commented Jun 30, 2014

I've been doing this in my project just by setting --paste and --logging-config to the same file, but I guess this is a sensible default so long as it doesn't override specifying --logging-config.

I can check the code later but if you know yourself already, please comment. Does this happen before the logging config setting would take effect so that it already is implemented as I say above?

@benoitc
Copy link
Owner

benoitc commented Jul 1, 2014

So using --paste doesn't set the config?

@berkerpeksag
Copy link
Collaborator Author

Does this happen before the logging config setting would take effect so that it already is implemented as I say above?

Yes. See https://github.com/benoitc/gunicorn/blob/master/gunicorn/app/wsgiapp.py#L16-32 for the relevant code.

Maybe we could override wsgiapp.WSGIApplication:load_config like pasterapp.PasterBaseApplication?

https://github.com/benoitc/gunicorn/blob/master/gunicorn/app/pasterapp.py#L68

@sontek
Copy link

sontek commented Jul 12, 2014

+1!

gunicorn --paste development.ini --log-config development.ini doesn't seem to work in 19.0 anymore either like it did in 18.0

@tilgovi
Copy link
Collaborator

tilgovi commented Jul 12, 2014

I'll take a look tomorrow. I bet there's some refactoring we can do here.
Maybe it's also time to rip out the deprecate gunicorn_paster and paster compat code.

@benoitc benoitc added this to the R19.1 milestone Jul 25, 2014
benoitc added a commit that referenced this pull request Jul 26, 2014
Set global logging configuration from a Paste config.
@benoitc benoitc merged commit 7bb1a57 into benoitc:master Jul 26, 2014
@berkerpeksag berkerpeksag deleted the set-logging-paste branch July 26, 2014 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants