Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logging boltons #292

Open
adriangb opened this issue Sep 12, 2021 · 0 comments
Open

Logging boltons #292

adriangb opened this issue Sep 12, 2021 · 0 comments

Comments

@adriangb
Copy link

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).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant