diff --git a/avocado/core/job.py b/avocado/core/job.py index abb4d82f28..4a07a66567 100644 --- a/avocado/core/job.py +++ b/avocado/core/job.py @@ -209,9 +209,7 @@ def __exit__(self, _exc_type, _exc_value, _traceback): def __start_job_logging(self): # Enable test logger full_log = os.path.join(self.logdir, "full.log") - fmt = ( - "%(asctime)s %(module)-16.16s L%(lineno)-.4d %(levelname)-5.5s| %(message)s" - ) + fmt = "%(asctime)s %(name)s %(module)-16.16s L%(lineno)-.4d %(levelname)-5.5s| %(message)s" output.add_log_handler( LOG_JOB, logging.FileHandler, diff --git a/avocado/core/utils/messages.py b/avocado/core/utils/messages.py index a705090942..ab76b68abd 100644 --- a/avocado/core/utils/messages.py +++ b/avocado/core/utils/messages.py @@ -249,7 +249,7 @@ def start_logging(config, queue): log_handler = RunnerLogHandler(queue, "log") stdout_handler = RunnerLogHandler(queue, "stdout") stderr_handler = RunnerLogHandler(queue, "stderr") - fmt = "%(asctime)s %(module)-16.16s L%(lineno)-.4d %(levelname)-5.5s| %(message)s" + fmt = "%(asctime)s %(name)s %(module)-16.16s L%(lineno)-.4d %(levelname)-5.5s| %(message)s" formatter = logging.Formatter(fmt=fmt) log_handler.setFormatter(formatter) stdout_handler.setFormatter(formatter) diff --git a/selftests/functional/basic.py b/selftests/functional/basic.py index 8f01288e0c..d152f6b962 100644 --- a/selftests/functional/basic.py +++ b/selftests/functional/basic.py @@ -823,7 +823,7 @@ def check_matplotlib_logs(file_path): self.assertTrue(os.path.exists(file_path)) with open(file_path, encoding="utf-8") as file: stream = file.read() - self.assertIn("matplotlib DEBUG|", stream) + self.assertIn("matplotlib __init__ L0337 DEBUG|", stream) log_dir = os.path.join(self.tmpdir.name, "latest") test_log_dir = os.path.join(