code: def failure_line_summary(formatter, failure_line):
      
      if failure_line.action == "test_result":
          action = "test_status" if failure_line.subtest is not None else "test_end"
      elif failure_line.action == "truncated":
          return
      else:
          action = failure_line.action
  
      try:
          mozlog_func = getattr(formatter, action)
      except AttributeError:
          logger.warning('Unknown mozlog function "%s"', action)
          return
  
      formatted_log = mozlog_func(failure_line.to_mozlog_format())
      split_log = first(formatted_log.split("\n", 1))
  
      if not split_log:
          logger.debug('Failed to split log', formatted_log)
          return
  
      return split_log.strip()
docs: Create a mozlog formatted error summary string from the given failure_line.
  
      Create a string which can be compared to a TextLogError.line string to see
      if they match.