From 2559ec8bdbaa71f5bc127e2f3fe50b79b98a2ad4 Mon Sep 17 00:00:00 2001 From: Thomas Hisch Date: Sun, 17 Sep 2017 14:14:13 +0200 Subject: [PATCH] use 'formatter' kwarg of catching_logs --- _pytest/logging.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_pytest/logging.py b/_pytest/logging.py index cec37b641..57ed4035b 100644 --- a/_pytest/logging.py +++ b/_pytest/logging.py @@ -350,9 +350,9 @@ class LoggingPlugin(object): log_cli_formatter = logging.Formatter( log_cli_format, datefmt=log_cli_date_format) - log_cli_handler.setFormatter(log_cli_formatter) self.log_cli_handler = log_cli_handler # needed for a single unittest self.live_logs = catching_logs(log_cli_handler, + formatter=log_cli_formatter, level=self.log_cli_level) log_file = get_option_ini(config, 'log_file')