in scripts/xcresult_logs.py [0:0]
def export_log(xcresult_path, log_id):
"""Exports the log data with the given id from the xcresult bundle.
Args:
xcresult_path: The path to an xcresult bundle.
log_id: The id that names the log output (obtained by find_log_id)
Returns:
The logged output, as a string.
"""
contents = xcresulttool_json('get', '--path', xcresult_path, '--id', log_id)
result = []
collect_log_output(contents, result)
return ''.join(result)