You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Use set_log_path hook,but only create log file, nothing in it. #5428
I'm using the --log-file=./myfile.log argument, and I have the same problem: A log file is created, but it's blank. I have failing tests, so I doubt that an insufficient log level is to blame.
I had the same issue and it was just because I needed to set the log_level in my pyproject.toml to "INFO"
Unfortunately it doesn't capture everything that PyCharm captures in the console. I need to be able to see stdout and stderr too.
Activity
Zac-HD commentedon Jun 25, 2019
Are you sure that logs are being emitted from those tests? What happens if you don't configure it to log to a file?
It looks to me like you need to (a) use the
caplogfixture, and (b) configure it to capture logging levels belowWARNING(the default).cameronhudson8 commentedon Jul 24, 2019
I'm using the
--log-file=./myfile.logargument, and I have the same problem: A log file is created, but it's blank. I have failing tests, so I doubt that an insufficient log level is to blame.The-Compiler commentedon Jul 24, 2019
@cameronhudson8 Your issue is unrelated to this (see #5659).
Zac-HD commentedon Sep 13, 2019
Closing as stale.
illeatmyhat commentedon May 19, 2025
I had the same issue and it was just because I needed to set the log_level in my
pyproject.tomlto "INFO"Unfortunately it doesn't capture everything that PyCharm captures in the console. I need to be able to see stdout and stderr too.