-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed
Closed
Copy link
Labels
plugin: loggingrelated to the logging builtin pluginrelated to the logging builtin plugintype: proposalproposal for a new feature, often to gather opinions or design the API around the new featureproposal for a new feature, often to gather opinions or design the API around the new feature
Milestone
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
FedericoCeratto and tombart
Metadata
Metadata
Assignees
Labels
plugin: loggingrelated to the logging builtin pluginrelated to the logging builtin plugintype: proposalproposal for a new feature, often to gather opinions or design the API around the new featureproposal for a new feature, often to gather opinions or design the API around the new feature