mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
Allow configuring logger_class with statsd_host
Currently if you configure statsd_host, a configured logger_class will never be used. I think this makes a user configured logger class always take priority. (This is PoC change, I will come back and add tests/docs if it's worth pursuing)
This commit is contained in:
parent
b776eba5fe
commit
f68a043c24
@ -147,7 +147,7 @@ class Config(object):
|
|||||||
uri = "gunicorn.glogging.Logger"
|
uri = "gunicorn.glogging.Logger"
|
||||||
|
|
||||||
# if statsd is on, automagically switch to the statsd logger
|
# if statsd is on, automagically switch to the statsd logger
|
||||||
if 'statsd_host' in self.settings and self.settings['statsd_host'].value is not None:
|
if uri is not None and 'statsd_host' in self.settings and self.settings['statsd_host'].value is not None:
|
||||||
logger_class = util.load_class("gunicorn.instrument.statsd.Statsd",
|
logger_class = util.load_class("gunicorn.instrument.statsd.Statsd",
|
||||||
section="gunicorn.loggers")
|
section="gunicorn.loggers")
|
||||||
else:
|
else:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user