Fix LogRecord pre-formatting, closes #2801

This commit is contained in:
Florian Demmer 2022-05-20 11:37:53 +02:00
parent a7ead9831e
commit 0b5c4aea99
No known key found for this signature in database
GPG Key ID: 4EB6B45EB092E908
3 changed files with 3 additions and 3 deletions

View File

@ -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.

View File

@ -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.

View File

@ -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: