MCPcopy
hub / github.com/benoitc/gunicorn / logger_class

Method logger_class

gunicorn/config.py:154–173  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

152
153 @property
154 def logger_class(self):
155 uri = self.settings['logger_class'].get()
156 if uri == "simple":
157 # support the default
158 uri = LoggerClass.default
159
160 # if default logger is in use, and statsd is on, automagically switch
161 # to the statsd logger
162 if uri == LoggerClass.default:
163 if 'statsd_host' in self.settings and self.settings['statsd_host'].value is not None:
164 uri = "gunicorn.instrument.statsd.Statsd"
165
166 logger_class = util.load_class(
167 uri,
168 default="gunicorn.glogging.Logger",
169 section="gunicorn.loggers")
170
171 if hasattr(logger_class, "install"):
172 logger_class.install()
173 return logger_class
174
175 @property
176 def is_ssl(self):

Callers 1

setupMethod · 0.80

Calls 1

getMethod · 0.45

Tested by

no test coverage detected