Skip to content
Myr

Merge pull request #2786 from greyli/patch-9

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

[Docs] Make super() compatible for Python2

authored by Hsiaoming Yang · committed by GitHub · parents 0303653, 07b9ff6 · 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