-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Can't access "Captured stderr call" section of logging #5160
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
Comments
I believe I am also experiencing this. I'm am not super familiar with the caplog fixture but if it's intended usage is to capture all logging calls during test execution then like OP I am only seeing logging calls int he capture stderr output of pytest and not in the A simplified view of my application and test code
produces
|
Able to "finagle" it by saving the root loggers handler (LogCaptureHandler) for future use:
|
Also seeing this (pytest 6.2.1). Seems possibly related to #5997 (see: #5997 (comment)). With the same logging setup as OP, I am not able to capture the log records, and since one of their handlers is console/stderr, figured that |
Also possibly related to #7335. |
I suspect it might be related to: pytest-dev/pytest#5160 pytest-dev/pytest#5997
I'm attempting to capture the output of a custom logging configuration dict. But for some reason the once I use
logging.config.dictConfig
all the logging output is pushed into theCaptured stderr call
and I can't see it in thecaplog
fixture.How do I access this logging data?
pip list
of the virtual environment you are usingRunning this test gives me this output (notice the INFO log in the
Captured stderr call
section):The text was updated successfully, but these errors were encountered: