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.

Changes between revision 1 and 2

orig
1
2
3
4

Commits

Summary ID Author
added logger global variable to have named logging in files in reviewboard/re...
af955d6577f0c7a5c14f95c82ad42a3a0810ab58 Ryan Kang
added test that unregister handler logs when handler is unregistered
aa0b092d17a7b02fcc31d5df99c84226da95bdda Ryan Kang
added two space after classes and fixed line that was too long
b7f46628bd891c9c1150c845d3d68ef9562ae13b Ryan Kang
reviewboard/attachments/tests.py
Loading...