Skip to content

Commit

Permalink
Merge pull request #2802 from fdemmer/2801-fix-logrecords
Browse files Browse the repository at this point in the history
Fix LogRecord pre-formatting, closes #2801
  • Loading branch information
benoitc committed May 7, 2023
2 parents bc39261 + 0b5c4ae commit 506d014
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/source/settings.rst
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion gunicorn/config.py
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion gunicorn/workers/ggevent.py
Expand Up @@ -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:
Expand Down

0 comments on commit 506d014

Please sign in to comment.