You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There's a couple pure-python logging tools/utils that I find myself re-implementing often. I wonder if they could be added here:
A bind function that works like Loguru's bind() but w/ any logger, and is thread & coroutine safe.
A testing tool like structlog.testing (or unittest.assertLogs in it's simplest form) that allows you to capture not only log records but also formatted output.
A tool like contextlib.redirect_stdout but that doesn't do it by monkey patching the sys module (that's how contextlib.redirect_stdout works) an instead operates at the os file descriptor level (os.dup/os.dup2).
The text was updated successfully, but these errors were encountered:
There's a couple pure-python logging tools/utils that I find myself re-implementing often. I wonder if they could be added here:
bind
function that works like Loguru'sbind()
but w/ any logger, and is thread & coroutine safe.structlog.testing
(orunittest.assertLogs
in it's simplest form) that allows you to capture not only log records but also formatted output.contextlib.redirect_stdout
but that doesn't do it by monkey patching thesys
module (that's howcontextlib.redirect_stdout
works) an instead operates at the os file descriptor level (os.dup/os.dup2
).The text was updated successfully, but these errors were encountered: