Skip to content

Support configuring console logger with Rebot (#5674)#5677

Open
oboehmer wants to merge 8 commits into
robotframework:masterfrom
oboehmer:5674-rebot-console
Open

Support configuring console logger with Rebot (#5674)#5677
oboehmer wants to merge 8 commits into
robotframework:masterfrom
oboehmer:5674-rebot-console

Conversation

@oboehmer
Copy link
Copy Markdown
Contributor

Summary

Add --console and --quiet options to rebot, mirroring the mechanism added to robot in #5671/#5672. This allows controlling Rebot's console output type, including custom console loggers.

Changes

  • --console verbose|quiet|none|path.to.CustomLogger — select console output type for Rebot
  • --quiet — shortcut for --console quiet
  • --console dotted — rejected with a clear error (dotted is meaningless without test execution progress)
  • Programmatic APIrebot(..., console='quiet') or rebot(..., console=my_logger_obj) both work
  • Move pythonpath setup before console logger registration in Rebot.main() so custom console modules on --pythonpath can be imported
  • Skipped --dotted, --consolewidth, --consolemarkers as they don't apply to Rebot's non-execution context

Files changed

File Change
src/robot/conf/settings.py Add ConsoleType/ConsoleTypeQuiet to RebotSettings, add console property with dotted rejection, update console_output_config, prevent console propagation in get_rebot_settings()
src/robot/rebot.py Add --console/--quiet to USAGE, reorder pythonpath before console registration, update rebot() docstring
atest/resources/atest_resource.robot Add Stdout Should Be Empty keyword
atest/robot/cli/rebot/console.robot New: 12 acceptance tests

Fixes #5674

oboehmer added 3 commits May 13, 2026 16:23
Add --console and --quiet options to rebot, mirroring the mechanism
from robot (PR robotframework#5671). Supports built-in consoles (verbose, quiet,
none) and custom console loggers via dotted path or module name.
The programmatic API also accepts console objects directly.

Also fix pythonpath ordering in Rebot.main() so custom console
modules on --pythonpath can be imported (matching robot's behavior).
Dotted console is meaningless for Rebot since there is no test
execution progress to display. Raise a clear DataError instead of
silently creating a DottedOutput that behaves like verbose.
Test that rebot() accepts a console object via the programmatic API,
mirroring the existing TestCustomConsole tests for run().
@oboehmer oboehmer force-pushed the 5674-rebot-console branch from f0da9f9 to ffc2eb1 Compare May 13, 2026 14:57
Copy link
Copy Markdown
Member

@pekkaklarck pekkaklarck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I took a quick look and the PR looks great. I'll take another look with a bit fresher eyes later, but it may take few days before I have time for that. See separate comments for things I noticed now.

Comment thread src/robot/conf/settings.py Outdated
Comment thread src/robot/conf/settings.py Outdated
Comment thread atest/robot/cli/rebot/console.robot Outdated
Copy link
Copy Markdown
Member

@pekkaklarck pekkaklarck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks very good! I added some nitpickey comments that you may want to look at. Write a comment here or ping me on Slack when you are done with possible changes and I merge this.

Comment thread atest/robot/cli/rebot/console.robot Outdated
Comment thread src/robot/rebot.py Outdated
@oboehmer
Copy link
Copy Markdown
Contributor Author

@pekkaklarck , all comments addressed, ready to be merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support configuring console logger with Rebot

2 participants