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

Conversation

Projects
None yet
4 participants
@berkerpeksag
Collaborator

berkerpeksag commented Jun 28, 2014

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

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.
@tilgovi

This comment has been minimized.

Show comment
Hide comment
@tilgovi

tilgovi Jun 30, 2014

Collaborator

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?

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

This comment has been minimized.

Show comment
Hide comment
@benoitc

benoitc Jul 1, 2014

Owner

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

Owner

benoitc commented Jul 1, 2014

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

@berkerpeksag

This comment has been minimized.

Show comment
Hide comment
@berkerpeksag

berkerpeksag Jul 3, 2014

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

Collaborator

berkerpeksag commented Jul 3, 2014

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

This comment has been minimized.

Show comment
Hide comment
@sontek

sontek 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

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

This comment has been minimized.

Show comment
Hide comment
@tilgovi

tilgovi Jul 12, 2014

Collaborator

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.

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

Merge pull request #809 from berkerpeksag/set-logging-paste
Set global logging configuration from a Paste config.

@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 berkerpeksag:set-logging-paste branch Jul 26, 2014

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