Skip to content

Commit

Permalink
logging.py: Don't change log level of the root logger to bigger numer…
Browse files Browse the repository at this point in the history
…ic value
  • Loading branch information
KKoukiou committed Mar 14, 2018
1 parent b2b629f commit ec68803
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion _pytest/logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ def catching_logs(handler, formatter=None, level=None):
root_logger.addHandler(handler)
if level is not None:
orig_level = root_logger.level
root_logger.setLevel(level)
root_logger.setLevel(min(orig_level, level))
try:
yield handler
finally:
Expand Down

0 comments on commit ec68803

Please sign in to comment.