Respect logger_class setting unless statsd is on #853

Merged
merged 1 commit into from Aug 16, 2014

Projects

None yet

3 participants

@alq666
Contributor
alq666 commented Aug 16, 2014

This should fix #848.

If --statsd-host is set to some value, it will set logger_class to the StatsD logger. If the option is not present it respects any logger_class that is passed as an option.

@tilgovi tilgovi commented on the diff Aug 16, 2014
gunicorn/config.py
# if statsd is on, automagically switch to the statsd logger
- if 'statsd_host' in self.settings:
+ if 'statsd_host' in self.settings and self.settings['statsd_host'].value is not None:
@tilgovi
tilgovi Aug 16, 2014 Collaborator

Could be written simply as if self.settings.get('statsd_host') is not None

@tilgovi
tilgovi Aug 16, 2014 Collaborator

Just my style. Ignore me. It's fine :-D
🍻

@tilgovi
Collaborator
tilgovi commented Aug 16, 2014

Thanks for checking into this. The fix looks good.

@tilgovi tilgovi merged commit 88804ae into benoitc:master Aug 16, 2014

1 check passed

continuous-integration/travis-ci The Travis CI build passed
Details
@berkerpeksag
Collaborator

I've just ran make -C docs html to update the docs/source/settings.rst file: 9adf122

The online documentation is up-to-date.

@tilgovi
Collaborator
tilgovi commented Aug 18, 2014

Thanks, @berkerpeksag

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