Skip to content
Myr

Make super() compatible for Python2

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Grey Li · committed by GitHub · parent 0303653 · Browse files · 1 file+1 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:docs/logging.rst+1 added-1 removed
122 unmodified lines
123 class RequestFormatter(logging.Formatter):124 def format(self, record):125 record.url = request.url126 record.remote_addr = request.remote_addr127 return super().format(record)127 return super(RequestFormatter, self).format(record)128129 formatter = RequestFormatter(130 '[%(asctime)s] %(remote_addr)s requested %(url)s\n'131 '%(levelname)s in %(module)s: %(message)s'
44 unmodified lines