-
If there is an error in log-handling (e.g. wrong args to logger call) do not fail or raise but produce something helpful
-
Need to make sure that json output is formatted since e.g. warning messages are created like this: log.warning('%s', actual_message) so without proper formatting the message is just "%s". Also test that exception info is added as usual. -
Warning message includes source file and line number, hope this is not dependent on python version..
-
Encountered an example where a 3rd-party library issued a warning that messed up the json output. Create test to reproduce this.
-
(1) Cannot open a temp file for writing from 2 python processes simultaneously (2) Need proper environment setup for Popen (thanks to metatoaster's reply on stackoverflow https://stackoverflow.com/a/72845540/4405656) (3) Need different os-separator, so replace hard-coded '/' with os.path.join or os.sep (4) Minor cleanup of imports & whitespace in test_issue_*.py There are still 2 tests that should be adapted to Windows, but those are lower-prio in my eyes. Also, unittest run on my windows VM creates many resource warnings due to non-closed file descriptors. Should address that some (future) day.
-
Every logging call can have an optional arg type='...' which is ignored when logging to text but shows in json output. The "type" of regular logging output in json is type='msg'. Added 2 messages with different type, adjusted existing test, created 2 new ones.