Set global logging configuration from a Paste config. #809

Merged
merged 1 commit into from Jul 26, 2014

Projects

None yet

4 participants

@berkerpeksag
Collaborator

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

@berkerpeksag berkerpeksag Set global logging configuration from a Paste config.
Since gunicorn.app.pasterapp.{run, paste_server} are deprecated,
there is no way to configure the logging module from a Paste config
file.
b6d445a
@tilgovi
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
Owner
benoitc commented Jul 1, 2014

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

@berkerpeksag
Collaborator

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
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
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 benoitc merged commit 7bb1a57 into benoitc:master Jul 26, 2014

1 check passed

continuous-integration/travis-ci The Travis CI build passed
Details
@berkerpeksag berkerpeksag deleted the unknown repository branch Jul 26, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment