Fish Trophy

maubin got a fish trophy!

Replace non-named logging with named logging for reviewboard.diffviewer

Review Request #11811 — Created Sept. 17, 2021 and submitted

maubin
Review Board
release-4.0.x
4903
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
Replace non-named logging with named logging for reviewboard.diffview
Michelle
Fixed formatting issues
Michelle
Description From Last Updated

The summary, description, and testing all mention "diffview", but the name of the module is "diffviewer".

chipx86chipx86

The description should wrap to around 75 characters, in order to ensure it fits properly in a Git diff. This …

chipx86chipx86

Just realized, this seems to be missing the bug number. You can fill that in on the "Bugs" field on …

chipx86chipx86

For the top-level of a module, we use two blank lines between sections. The constants above are one section, and …

chipx86chipx86

The attribute values on the following two lines no longer line up with the one on the first line.

chipx86chipx86

Same as in the other file, you'll want two blank lines on either side of this declaration.

chipx86chipx86

Same as in the other file, the parameters no longer align. This repeats for the changes made below, so make …

chipx86chipx86
chipx86
  1. 
      
  2. The summary, description, and testing all mention "diffview", but the name of the module is "diffviewer".

  3. 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.

  4. 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 and def convert_to_unicode, you'll want to have two blank lines on either side of logger =.

  5. 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.

  6. 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.

  7. 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.

  8. 
      
chipx86
  1. 
      
  2. Just realized, this seems to be missing the bug number. You can fill that in on the "Bugs" field on the right.

  3. 
      
maubin
chipx86
  1. Ship It!
  2. 
      
maubin
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to django-3.2 (0ded004)
Loading...