Added logger global variable to have named logging in files in reviewboard.attachments

Review Request #11394 — Created Jan. 22, 2021 and discarded — Latest diff uploaded

Information

Review Board
release-4.0.x

Reviewers

Previously logging in reviewboard/reviewboard/attachments was
un-named logging. This means it's hard to determine where the
error came from in the logs.

To fix this a global logger variable was defined in each file
that adds the location of the file to the error message.

Added unit test for unregister_mimetype_handler that passes it an
unregistered handler. This should cause an error to be logged. The
unit test listens to whether or not the logger ran.

Ran ./tests/runtests.py reviewboard.attachments and passed all 32 tests.

Commits

Files