diff --git a/docs/source/settings.rst b/docs/source/settings.rst index fb3eee2af..52c3e62f0 100644 --- a/docs/source/settings.rst +++ b/docs/source/settings.rst @@ -836,7 +836,7 @@ The callable needs to accept a single instance variable for the Arbiter. .. code-block:: python def pre_request(worker, req): - worker.log.debug("%s %s" % (req.method, req.path)) + worker.log.debug("%s %s", req.method, req.path) Called just before a worker processes the request. diff --git a/gunicorn/config.py b/gunicorn/config.py index a41bd21c0..64a125068 100644 --- a/gunicorn/config.py +++ b/gunicorn/config.py @@ -1906,7 +1906,7 @@ class PreRequest(Setting): type = callable def pre_request(worker, req): - worker.log.debug("%s %s" % (req.method, req.path)) + worker.log.debug("%s %s", req.method, req.path) default = staticmethod(pre_request) desc = """\ Called just before a worker processes the request. diff --git a/gunicorn/workers/ggevent.py b/gunicorn/workers/ggevent.py index 0a844db3a..5c41f14ec 100644 --- a/gunicorn/workers/ggevent.py +++ b/gunicorn/workers/ggevent.py @@ -110,7 +110,7 @@ def run(self): gevent.sleep(1.0) # Force kill all active the handlers - self.log.warning("Worker graceful timeout (pid:%s)" % self.pid) + self.log.warning("Worker graceful timeout (pid:%s)", self.pid) for server in servers: server.stop(timeout=1) except Exception: