Add option --log-cli-level in python-pytest-dispatch #74
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When writing tests, I usually display debugging information by using
logging.info(...)
orlogging.debug(...)
. When--log-cli-level=debug
is passed topytest
,logging.info
andlogging.debug
messages are shown. When--log-cli-level=info
is passed topytest
,logging.info
messages are shown. In this pull request, I introduce changes to include--log-cli-level
inpython-pytest-dispatch
so that users can conveniently toggle this option.I wanted to use
-l
as the shortcut for setting--log-cli-level
, but-l
is already used inpython-pytest-dispatch
for setting--showlocals
. For this reason, I ended up using--l
.It is worth mentioning that pytest not only defines
--log-cli-level
, but it also defines--log-level
,--log-file-level
. However, I don't know what--log-level
and--log-file-level
are used for. I have only used--log-cli-level
because suits my use case