Replies: 2 comments
-
I have had and over come this exact problem in a variety of ways. Can you provide code examples? |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hi, I am not exactly sure what happened, but the issue solved itself after a few days. Maybe I was mistyping the environment variable repeatedly, or maybe I was in a virtenv which somehow broke something? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I have a project where I utilize PyO3 and I have recently started implementing unit tests for the project with pytest. The library itself has many debug! messages it emits, which I would like to take a look at when one of the unit tests fail. Normally, I would use the
RUST_LOG
envvar to enable the printing of debug! messages. I have tried running pytest withRUST_LOG=debug
but that has sadly not helped. I then tried binding pyo3-log and use that as my logger; that also didn't work, even after calling pytest explicitly with--log-level=debug
. I initialize the logger in the respective#[pymodule]
block of my library, I have also ensured that the code where I bind the logger is covered. I am unsure what's wrong becauseRUST_LOG
was sufficient (to reveal debug! messages) before I started using pytest.I would highly appreciate any tips to get logging to work with pytest. Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions