add an option to change access_log using gunicorn

This commit is contained in:
Sergey Fedoruk
2018-12-29 23:56:01 +01:00
committed by Sergey Fedoruk
parent cea1547e08
commit d76d5e2c5f
3 changed files with 97 additions and 0 deletions

View File

@@ -57,6 +57,10 @@ class GunicornWorker(base.Worker):
if self.app.callable.websocket_enabled
else self.http_protocol
)
# set ACCESS_LOG on base of logging level
self.app.callable.config.ACCESS_LOG = self.log.loglevel <= logging.INFO
self._server_settings = self.app.callable._helper(
loop=self.loop,
debug=is_debug,