diff options
| author | Chris Lamb <chris@chris-lamb.co.uk> | 2017-11-19 09:15:08 +0900 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2017-11-18 19:15:08 -0500 |
| commit | 3af305e8b8a89f4b0e5874cd601568ab8dcd7334 (patch) | |
| tree | 7c8d982dc6aad49215f67b86d74c1610549e7446 /django/utils/log.py | |
| parent | bf49d9eb0b33aefc7179d3843fad0cb7df4e7790 (diff) | |
Fixed #28810 -- Replaced '%' style logging formatting with str.format() style.
Diffstat (limited to 'django/utils/log.py')
| -rw-r--r-- | django/utils/log.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/django/utils/log.py b/django/utils/log.py index 495b846a62..12b830a794 100644 --- a/django/utils/log.py +++ b/django/utils/log.py @@ -27,7 +27,8 @@ DEFAULT_LOGGING = { 'formatters': { 'django.server': { '()': 'django.utils.log.ServerFormatter', - 'format': '[%(server_time)s] %(message)s', + 'format': '[{server_time}] {message}', + 'style': '{', } }, 'handlers': { @@ -190,4 +191,4 @@ class ServerFormatter(logging.Formatter): return super().format(record) def uses_server_time(self): - return self._fmt.find('%(server_time)') >= 0 + return self._fmt.find('{server_time}') >= 0 |
