Skip to content

Support printing errors only to the log.html file and not to the console #5460

@adombeck

Description

@adombeck

In our tests using Robot Framework, we record a video while the test is executed and want to attach that video to the log.html file when the test fails.

That works fine when printing the video in webm format as base64 via logger.error. The video is then displayed in the "Test Execution Errors" section. The problem we're facing is that this base64 encoded video is also printed on the console, which produces a lot of useless output which you need to scroll through to get to the actual error messages about the test failure. So what we want is a way to attach the video to the log.html file without printing it to the console.

One option we discussed with @pekkaklarck on Slack is to add an optional also_console=True argument to logger.error (and logger.warn), similar to the also_console=False argument which logger.info already supports, except for the default value (True instead of False).

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions