def METHOD_NAME(self, job):
    statuses = job.config.get("job.output.testlogs.statuses")
    summary = job.config.get("job.output.testlogs.summary_statuses")
    if job.config.get("stdout_claimed_by") is not None:
        return
    try:
        with open(
            os.path.join(job.logdir, "results.json"), encoding="utf-8"
        ) as json_file:
            results = json.load(json_file)
    except FileNotFoundError:
        return
    logfiles = job.config.get("job.output.testlogs.logfiles")
    summary_tests = []
    for test in results["tests"]:
        if test["status"] in summary:
            line = f"{test['name']}: {test['status']}"
            summary_tests.append(line)
        if not statuses or test["status"] not in statuses:
            continue
        for logfile in logfiles:
            path = os.path.join(test["logdir"], logfile)
            try:
                with open(path, encoding="utf-8") as log:
                    LOG_UI.info(
                        'Log file "%s" content for test "%s" (%s):',
                        logfile,
                        test["id"],
                        test["status"],
                    )
                    LOG_UI.debug(log.read())
            except (FileNotFoundError, PermissionError) as error:
                LOG_UI.error('Failure to access log file "%s": %s', path, error)
    if summary_tests:
        LOG_UI.info("")
        LOG_UI.info("Test summary:")
        for test in sorted(summary_tests):
            LOG_UI.error(test)