python: Use Python's logging through pyo3_log#319
Conversation
|
I've used this a lot with own added info messages; the trace messages emitted by lakers itself are not visible in this unless we touch one more knob -- might make sense to turn that on by default, because nothing we do is performance critical on the Python side. |
|
Cool! Suggested a comment just for clarity. Could you enable that knob so that we don't lose the from-Rust log functionality that we currently have? Is it possible to have it controlled by an env var like with env_logger? |
|
I'll add some API expositure and some basicConfig reference. |
|
I misunderstood how this can be configured – more API won't do us any good. Instead, given that we're not logging a whole lot, and are not performance critical in Python, I've changed the code to unconditionally log trace from Rust. (This is still not super slow, as all pyo3_log's caching etc is still in). There are module level docs now that explain the logging isutation. |
|
Thanks for this PR! Merging |
This makes logging accessible and configurable through Python.