Skip to content

Commit

Permalink
Enable live logs is log_cli_level is passed/set explicitly
Browse files Browse the repository at this point in the history
  • Loading branch information
s0undt3ch committed Jan 31, 2018
1 parent 53eaafe commit 6dbb49f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions _pytest/logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,11 @@ def __init__(self, config):
"""
self._config = config

# enable live logs if log_cli_level is explicitly set
log_cli_level = get_actual_log_level(self._config, 'log_cli_level', 'log_level')
if log_cli_level is not None:
# enable live logs if log_cli_level is explicitly set
config._inicache['log_cli'] = config._parser._inidict['log_cli'] = True
# enable verbose output automatically if live logging is enabled
if self._config.getini('log_cli') and not config.getoption('verbose'):
# sanity check: terminal reporter should not have been loaded at this point
Expand Down
1 change: 1 addition & 0 deletions changelog/3175.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Enable live logs is log_cli_level is passed/set explicitly

0 comments on commit 6dbb49f

Please sign in to comment.