@@ -123,6 +123,15 @@ def add_global_arguments(parser: argparse.ArgumentParser):
123123 help = "Produce verbose output for debugging." ,
124124 )
125125
126+ parser .add_argument (
127+ "--detailed_timestamped_log" ,
128+ action = "store_true" ,
129+ help = """
130+ Enable detailed logging of the Bazel command with timestamps. The logs
131+ will be stored and can be accessed as artifacts.
132+ """ ,
133+ )
134+
126135
127136def add_artifact_subcommand_arguments (parser : argparse .ArgumentParser ):
128137 """Adds all the arguments that applies to the artifact subcommands."""
@@ -399,7 +408,7 @@ async def main():
399408 else :
400409 requirements_command .append ("//build:requirements.update" )
401410
402- result = await executor .run (requirements_command .get_command_as_string (), args .dry_run )
411+ result = await executor .run (requirements_command .get_command_as_string (), args .dry_run , args . detailed_timestamped_log )
403412 if result .return_code != 0 :
404413 raise RuntimeError (f"Command failed with return code { result .return_code } " )
405414 else :
@@ -597,7 +606,7 @@ async def main():
597606
598607 wheel_build_command .append (f"--jaxlib_git_hash={ git_hash } " )
599608
600- result = await executor .run (wheel_build_command .get_command_as_string (), args .dry_run )
609+ result = await executor .run (wheel_build_command .get_command_as_string (), args .dry_run , args . detailed_timestamped_log )
601610 # Exit with error if any wheel build fails.
602611 if result .return_code != 0 :
603612 raise RuntimeError (f"Command failed with return code { result .return_code } " )
@@ -607,4 +616,4 @@ async def main():
607616
608617
609618if __name__ == "__main__" :
610- asyncio .run (main ())
619+ asyncio .run (main ())
0 commit comments