diff --git a/docs/source/settings.rst b/docs/source/settings.rst index a322b615..9fef88ec 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 a41bd21c..64a12506 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 0a844db3..5c41f14e 100644 --- a/gunicorn/workers/ggevent.py +++ b/gunicorn/workers/ggevent.py @@ -110,7 +110,7 @@ class GeventWorker(AsyncWorker): 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: