Support configuring console logger with Rebot (#5674)#5677
Open
oboehmer wants to merge 8 commits into
Open
Conversation
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().
f0da9f9 to
ffc2eb1
Compare
pekkaklarck
reviewed
May 13, 2026
Member
pekkaklarck
left a comment
There was a problem hiding this comment.
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.
pekkaklarck
approved these changes
May 17, 2026
Member
pekkaklarck
left a comment
There was a problem hiding this comment.
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.
Contributor
Author
|
@pekkaklarck , all comments addressed, ready to be merged. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add
--consoleand--quietoptions torebot, mirroring the mechanism added torobotin #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)rebot(..., console='quiet')orrebot(..., console=my_logger_obj)both workpythonpathsetup before console logger registration inRebot.main()so custom console modules on--pythonpathcan be imported--dotted,--consolewidth,--consolemarkersas they don't apply to Rebot's non-execution contextFiles changed
src/robot/conf/settings.pyConsoleType/ConsoleTypeQuiettoRebotSettings, addconsoleproperty with dotted rejection, updateconsole_output_config, prevent console propagation inget_rebot_settings()src/robot/rebot.py--console/--quietto USAGE, reorder pythonpath before console registration, updaterebot()docstringatest/resources/atest_resource.robotStdout Should Be Emptykeywordatest/robot/cli/rebot/console.robotFixes #5674