• 
      
    Fish Trophy

    maubin got a fish trophy!

    Fish Trophy

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

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

    Information

    Review Board
    release-4.0.x

    Reviewers

    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 ID Author
    Replace non-named logging with named logging for reviewboard.diffview
    While reviewboard.diffview 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.
    275c6085f9a108507279031e5bdec98153dab828 Michelle
    Fixed formatting issues
    Added two blank lines around the loggers instance declarations to denote that it is a separate section Removed extra spaces which were making attribute values in logging functions no longer line up with the other attributes
    b20c33b0f96792e529278d19ae9d319599285015 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. Show all issues

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

    3. Show all issues

      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)
       
       
       
       
       
       
      Show all issues

      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)
       
       
       
       
      Show all issues

      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)
       
       
       
       
       
       
      Show all issues

      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)
       
       
       
       
      Show all issues

      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. Show all issues

      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:
    Completed
    Change Summary:
    Pushed to django-3.2 (0ded004)