Browse Source

Make super() compatible for Python2

pull/2786/head
Grey Li 7 years ago committed by GitHub
parent
commit
07b9ff6e77
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      docs/logging.rst

2
docs/logging.rst

@ -124,7 +124,7 @@ handler. ::
def format(self, record): def format(self, record):
record.url = request.url record.url = request.url
record.remote_addr = request.remote_addr record.remote_addr = request.remote_addr
return super().format(record) return super(RequestFormatter, self).format(record)
formatter = RequestFormatter( formatter = RequestFormatter(
'[%(asctime)s] %(remote_addr)s requested %(url)s\n' '[%(asctime)s] %(remote_addr)s requested %(url)s\n'

Loading…
Cancel
Save