Fixed bug where --file-log-verbose=0 still produced verbose logs.
This commit is contained in:
parent
6e8fa92062
commit
ea6ddbc870
|
@ -847,7 +847,7 @@ class LoggingPlugin:
|
||||||
@hookimpl(wrapper=True)
|
@hookimpl(wrapper=True)
|
||||||
def pytest_runtest_setup(self, item: nodes.Item) -> Generator[None, None, None]:
|
def pytest_runtest_setup(self, item: nodes.Item) -> Generator[None, None, None]:
|
||||||
|
|
||||||
if self.log_file_verbose:
|
if self.log_file_verbose and int(self.log_file_verbose) >= 1:
|
||||||
old_log_file_formatter = self.log_file_handler.formatter
|
old_log_file_formatter = self.log_file_handler.formatter
|
||||||
self.log_file_handler.setFormatter(logging.Formatter())
|
self.log_file_handler.setFormatter(logging.Formatter())
|
||||||
self.log_file_handler.emit(logging.LogRecord('N/A', logging.INFO, 'N/A', 0, f"Running at {item.nodeid}", None, None))
|
self.log_file_handler.emit(logging.LogRecord('N/A', logging.INFO, 'N/A', 0, f"Running at {item.nodeid}", None, None))
|
||||||
|
|
Loading…
Reference in New Issue