def get_process_output(cmd_stdout, cmd_stderr):
  """Get task process log output."""
  text = ''
  if cmd_stdout:
    text += cmd_stdout.decode().replace('\r', '')
  if cmd_stderr:
    text += cmd_stderr.decode().replace('\r', '')
  return text.rstrip('\n\r')