Proposal: disable "live logging" by default and write to terminal writer instead · Issue #3013 · pytest-dev/pytest (original) (raw)
Navigation Menu
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Appearance settings
Description
The Live Logs feature currently is enabled by default and requires the user to pass -s
to see the logs.
I see two problems:
- If the user is interested in the feature, having to pass
-s
feels clumsy because now all sort of outputs will come through, reducing the actual usefulness of the feature because it will be harder to see the actual logging messages. - To solve 1), I believe we will need to write to the TerminalWriter, which by consequence will show up for all users from that point on even if they are not interested in the feature because the default is
WARNING
.
My proposal:
- Create a new property,
live_logs
, defaulting toFalse
. - Write the "live logs" to the TerminalWriter, probably in color according to the level, yellow for WARNING and red for CRITICAL. This means users won't need to use
-s
to see live logs anymore.
This feature was originally implemented in eisensheng/pytest-catchlog#33 but was never released to PyPI, so I assume "live logs" has seen little use in the wild.
cc @Thisch