boxine / bx_py_utils

Various Python utility functions
MIT License
7 stars 1 forks source link

Fix NoLogs #178

Closed phihag closed 1 year ago

phihag commented 1 year ago

NoLogs installed no handlers. But what happens if you don't install any handlers is that Python's logging framework automatically logs into a last-resort handler to stderr. Fix this by installing a NullHandler, and add both a test capturing sys.stderr as well as just executing it so we can see it (in case the sys.stderr` capture fails).