Finish changing logging to logger in modules reviews, webapi and ssh.

Review Request #11397 — Created Jan. 22, 2021 and submitted

qianxi
Review Board
master
4897, 4908, 4910
students

Change from logging to logger because we wish to see the information about the module where the logging message came from so that it's easier to diagnosing problems.
I changed logging to logger in modules reviews, webapi and ssh.

Test using the tests in the reviews, webapi and ssh modules' repositories. Using the following commands:

./tests/runtests.py reviewboard.reviews.tests
./tests/runtests.py reviewboard.webapi.tests
./tests/runtests.py reviewboard.ssh.tests

All three test sets are passed.

Summary
[WIP] Finish changing logging to logger in modules reviews, webapi and ssh. Not tested yet. Changing from logging to logger because we wish to see the information about the module where the logging message came from so that it's easier to diagnosing problems.
Change logging to logger in test_reviewtags.py. Finish modules reviews, webapi and ssh unit tests. I ran "./tests/runtests.py reviewboard.reviews.tests", "./tests/runtests.py reviewboard.webapi.tests" and "./tests/runtests.py reviewboard.ssh.tests". All all them give OK.
Fix extra line spaces with import variable.
Fix global logger line spacing issue.
Fix all one-char unaligned indentations due to the shorter logger string
Move local import statements right before spy
Remove extra space on a new blank line
Description From Last Updated

Your summary probably doesn't need that second sentence about unit tests.

daviddavid

E303 too many blank lines (2)

reviewbotreviewbot

You'll need to update the indentation on following lines to match, since "logger" is one character shorter than "logging". Here ...

daviddavid

Add an extra blank line above this.

daviddavid

Add an extra blank line above this.

daviddavid

This should have two blank lines after it.

daviddavid

This should have two blank lines above and below.

daviddavid

This should have two blank lines above and below.

daviddavid

This should have two blank lines above and below.

daviddavid

Let's move this down to happen just before the spy_on call.

daviddavid

Let's move this down to happen just before the spy_on call.

daviddavid

W293 blank line contains whitespace

reviewbotreviewbot
Checks run (1 failed, 1 succeeded)
flake8 failed.
JSHint passed.

flake8

qianxi
david
  1. 
      
  2. Your summary probably doesn't need that second sentence about unit tests.

  3. reviewboard/reviews/detail.py (Diff revision 2)
     
     
     
     

    You'll need to update the indentation on following lines to match, since "logger" is one character shorter than "logging". Here and in all the other changed places.

  4. reviewboard/reviews/ui/base.py (Diff revision 2)
     
     
     

    Add an extra blank line above this.

  5. reviewboard/ssh/storage.py (Diff revision 2)
     
     
     

    Add an extra blank line above this.

  6. This should have two blank lines after it.

  7. reviewboard/webapi/resources/diff.py (Diff revision 2)
     
     
     
     
     
     

    This should have two blank lines above and below.

  8. reviewboard/webapi/resources/review_request.py (Diff revision 2)
     
     
     
     
     
     

    This should have two blank lines above and below.

  9. reviewboard/webapi/resources/validate_diff.py (Diff revision 2)
     
     
     
     
     
     

    This should have two blank lines above and below.

  10. 
      
qianxi
david
  1. Looking really solid! Just two small suggestions.

  2. Let's move this down to happen just before the spy_on call.

  3. Let's move this down to happen just before the spy_on call.

  4. 
      
qianxi
Review request changed

Change Summary:

Move local import statements right before spy.

Commits:

Summary
-
[WIP] Finish changing logging to logger in modules reviews, webapi and ssh. Not tested yet. Changing from logging to logger because we wish to see the information about the module where the logging message came from so that it's easier to diagnosing problems.
-
Change logging to logger in test_reviewtags.py. Finish modules reviews, webapi and ssh unit tests. I ran "./tests/runtests.py reviewboard.reviews.tests", "./tests/runtests.py reviewboard.webapi.tests" and "./tests/runtests.py reviewboard.ssh.tests". All all them give OK.
-
Fix extra line spaces with import variable.
-
Fix global logger line spacing issue.
-
Fix all one-char unaligned indentations due to the shorter logger string
+
[WIP] Finish changing logging to logger in modules reviews, webapi and ssh. Not tested yet. Changing from logging to logger because we wish to see the information about the module where the logging message came from so that it's easier to diagnosing problems.
+
Change logging to logger in test_reviewtags.py. Finish modules reviews, webapi and ssh unit tests. I ran "./tests/runtests.py reviewboard.reviews.tests", "./tests/runtests.py reviewboard.webapi.tests" and "./tests/runtests.py reviewboard.ssh.tests". All all them give OK.
+
Fix extra line spaces with import variable.
+
Fix global logger line spacing issue.
+
Fix all one-char unaligned indentations due to the shorter logger string
+
Move local import statements right before spy

Diff:

Revision 4 (+549 -401)

Show changes

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

qianxi
david
  1. Ship It!
  2. 
      
qianxi
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-4.0.x (6c28b14)
Loading...