def Log(self, format_str, *args):
    """Logs the message using the flow's standard logging.

    Args:
      format_str: Format string
      *args: arguments to the format string
    Raises:
      RuntimeError: on parent missing logs_collection
    """
    format_str = utils.SmartUnicode(format_str)

    try:
      # The status message is always in unicode
      status = format_str % args
    except __HOLE__:
      logging.error("Tried to log a format string with the wrong number "
                    "of arguments: %s", format_str)
      status = format_str

    logging.info("%s: %s", self.session_id, status)

    self.SetStatus(utils.SmartUnicode(status))

    logs_collection = self.OpenLogsCollection(self.args.logs_collection_urn)
    logs_collection.Add(
        rdf_flows.FlowLog(client_id=None, urn=self.session_id,
                          flow_name=self.flow_obj.__class__.__name__,
                          log_message=status))
    logs_collection.Flush()
dataset/ETHPy150Open google/grr/grr/lib/hunts/implementation.py/HuntRunner.Log