Closed NfNitLoop closed 10 months ago
This branch is working for me!
https://github.com/dylanbstorey/pyo3-pylogger/compare/main..NfNitLoop:pyo3-pylogger:with-logger-name
Will merge and release this evening. Thanks for contributing !
0.2.2 released, thanks for the PR
Context
I'm calling into a large-ish Python codebase from Rust. It consists of multiple packages, each of which uses a named Python logger for logs.
In Python, it's easy to see which logs come from which (named) logger, but in Rust, it appears that the name of the logger is ignored. So, if I init logging like this:
All of the logs, from all of the various Python packages, end up with the same "python" prefix, and lose their individual contexts.
Request
Please include the python logger name in the output! IMO it should be present by default, but if you don't want to break backward compatibility, I suppose it could be opt-in.
Thanks for this library! 😊