diff --git a/openhands/core/config/utils.py b/openhands/core/config/utils.py index 876805869a..c526088809 100644 --- a/openhands/core/config/utils.py +++ b/openhands/core/config/utils.py @@ -759,6 +759,12 @@ def get_parser() -> argparse.ArgumentParser: type=bool, default=False, ) + parser.add_argument( + '--log-level', + help='Set the log level', + type=str, + default=None, + ) return parser diff --git a/tests/unit/test_arg_parser.py b/tests/unit/test_arg_parser.py index faa48cb86b..6b9a4b434c 100644 --- a/tests/unit/test_arg_parser.py +++ b/tests/unit/test_arg_parser.py @@ -138,13 +138,14 @@ def test_help_message(capsys): '--no-auto-continue', '--selected-repo SELECTED_REPO', '--override-cli-mode OVERRIDE_CLI_MODE', + '--log-level LOG_LEVEL', ] for element in expected_elements: assert element in help_output, f"Expected '{element}' to be in the help message" option_count = help_output.count(' -') - assert option_count == 20, f'Expected 20 options, found {option_count}' + assert option_count == 21, f'Expected 21 options, found {option_count}' def test_selected_repo_format():