-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
Feature/LoggingImprovementgood first issueOpen for everyone. A good first issue to become familiar with codebase.Open for everyone. A good first issue to become familiar with codebase.
Description
The msg
of logging calls should be format strings and not include variables.
msg – The event description message, possibly a format string with placeholders for variable data.
https://docs.python.org/3/library/logging.html#logrecord-objects
One example is at
gunicorn/gunicorn/workers/ggevent.py
Line 113 in cf55d2c
self.log.warning("Worker graceful timeout (pid:%s)" % self.pid) |
Pre-formatting variables into the msg
prevents aggregation of logs in tools/services like sentry.
danlamanna and antonpirker
Metadata
Metadata
Assignees
Labels
Feature/LoggingImprovementgood first issueOpen for everyone. A good first issue to become familiar with codebase.Open for everyone. A good first issue to become familiar with codebase.