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
I've been trying to find a way to enable logging on a per module basis but have failed. I'd like to be able to use command line options to enable cli logging of a particular module or set of modules.
So far I've tried things like creating a fixture that finds all relevant loggers and does the equivalent of [logger.setLevel(logging.DEBUG) for logger in selected_loggers]. But I don't get any output unless I use the -s switch.
Is there a way to get pytest to set logging levels for anything other than everything via the --log-cli-level command line argument?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi there,
I've been trying to find a way to enable logging on a per module basis but have failed. I'd like to be able to use command line options to enable cli logging of a particular module or set of modules.
So far I've tried things like creating a fixture that finds all relevant loggers and does the equivalent of
[logger.setLevel(logging.DEBUG) for logger in selected_loggers]
. But I don't get any output unless I use the-s
switch.Is there a way to get pytest to set logging levels for anything other than everything via the
--log-cli-level
command line argument?Beta Was this translation helpful? Give feedback.
All reactions