shunping commented on code in PR #35778: URL: https://github.com/apache/beam/pull/35778#discussion_r2252965875
########## sdks/python/apache_beam/runners/portability/prism_runner.py: ########## @@ -111,6 +111,19 @@ def _rename_if_different(src, dst): os.rename(src, dst) +def _get_prism_log_level(log_level: str) -> str: + """Returns a validated log level for Prism. + + The accepted values are "debug", "info", "warn", and "error". + """ + if log_level.lower() in ["debug", "info", "warn", "error"]: + return log_level.lower() + + raise ValueError( + f'Unknown prism log level: "{log_level}". ' + 'Available values are "debug", "info", "warn", and "error".') Review Comment: I think as long as we use "choices" in the parser, we don't need this auxiliary function any more. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@beam.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org