Fix up arguments to logging methods.

Review Request #12705 — Created Oct. 28, 2022 and submitted — Latest diff uploaded

Information

Review Board
release-6.x

Reviewers

We have a special logging formatter that is used to show info when a
django HttpRequest is part of the log record. Once upon a time, the
way of getting extra information into a log record was just to pass it
as additional kwargs to the log methods, but the modern, documented
way of doing it is to pass a single extra dict. This change fixes our
code up to use that. We also had several logging instances where we had
the request available but were not passing it to the log.

While I was auditing our log messages, I fixed up some other trivial
issues like formatting with args and indentation.

Ran unit tests.

Diff Revision 1 (Latest)

Commits

First Last Summary ID Author
Fix up arguments to logging methods.
We have a special logging formatter that is used to show info when a django `HttpRequest` is part of the log record. Once upon a time, the way of getting extra information into a log record was just to pass it as additional `kwargs` to the log methods, but the modern, documented way of doing it is to pass a single `extra` dict. This change fixes our code up to use that. We also had several logging instances where we had the request available but were not passing it to the log. While I was auditing our log messages, I fixed up some other trivial issues like formatting with args and indentation. Testing Done: Ran unit tests.
fceee1abc8169e81c189d171f185262af0b79ad8 David Trowbridge
This diff has been split across 2 pages: 1 2 >
reviewboard/accounts/views.py
reviewboard/accounts/backends/ad.py
reviewboard/accounts/backends/http_digest.py
reviewboard/accounts/backends/ldap.py
reviewboard/accounts/sso/backends/saml/views.py
reviewboard/accounts/templatetags/accounts.py
reviewboard/admin/middleware.py
reviewboard/admin/security_checks.py
reviewboard/admin/views.py
reviewboard/diffviewer/chunk_generator.py
reviewboard/diffviewer/views.py
reviewboard/extensions/hooks.py
reviewboard/hostingsvcs/beanstalk.py
reviewboard/hostingsvcs/bitbucket.py
reviewboard/hostingsvcs/gerrit.py
reviewboard/hostingsvcs/rbgateway.py
reviewboard/hostingsvcs/service.py
reviewboard/notifications/webhooks.py
reviewboard/reviews/detail.py
reviewboard/reviews/models/group.py
This diff has been split across 2 pages: 1 2 >
Loading...