
maubin got a fish trophy!
Replace non-named logging with named logging for reviewboard.diffviewer
Review Request #11811 — Created Sept. 17, 2021 and submitted
Information | |
---|---|
maubin | |
Review Board | |
release-4.0.x | |
4903 | |
Reviewers | |
reviewboard | |
While reviewboard.diffviewer already uses some named logging, this commit
replaces all other usages of non-named logging with named logging instead.Switching to named logging allows the logging mechanism to automatically
include information about the module and where the logging message came
from.
Ran unit tests for reviewboard.diffviewer and passed all tests.
Summary | Author | |
---|---|---|
Michelle | ||
Michelle |
Description | From | Last Updated |
---|---|---|
The summary, description, and testing all mention "diffview", but the name of the module is "diffviewer". |
|
|
The description should wrap to around 75 characters, in order to ensure it fits properly in a Git diff. This … |
|
|
Just realized, this seems to be missing the bug number. You can fill that in on the "Bugs" field on … |
|
|
For the top-level of a module, we use two blank lines between sections. The constants above are one section, and … |
|
|
The attribute values on the following two lines no longer line up with the one on the first line. |
|
|
Same as in the other file, you'll want two blank lines on either side of this declaration. |
|
|
Same as in the other file, the parameters no longer align. This repeats for the changes made below, so make … |
|
-
-
The summary, description, and testing all mention "diffview", but the name of the module is "diffviewer".
-
The description should wrap to around 75 characters, in order to ensure it fits properly in a Git diff. This is where it helps to make sure the description is written when making a commit, as that is often configured to impose a line length limit.
-
reviewboard/diffviewer/diffutils.py (Diff revision 1) For the top-level of a module, we use two blank lines between sections. The constants above are one section, and this
logger
can be seen as another section (instance declarations). Functions are another section.Just like how there were two blank lines between
_PATCH_GARBAGE_INPUT
anddef convert_to_unicode
, you'll want to have two blank lines on either side oflogger =
. -
reviewboard/diffviewer/diffutils.py (Diff revision 1) The attribute values on the following two lines no longer line up with the one on the first line.
-
reviewboard/diffviewer/views.py (Diff revision 1) Same as in the other file, you'll want two blank lines on either side of this declaration.
-
reviewboard/diffviewer/views.py (Diff revision 1) Same as in the other file, the parameters no longer align.
This repeats for the changes made below, so make sure that those are fixed as well.

Change Summary:
Fixed formatting issues in the code and review request description, added bug number
Summary: |
|
||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description: |
|
||||||||||||||||||||||||
Testing Done: |
|
||||||||||||||||||||||||
Commits: |
|
||||||||||||||||||||||||
Bugs: |
|
||||||||||||||||||||||||
Diff: |
Revision 2 (+98 -86) |