code: def ParseAction(self, action):
      
      rslt = rdf_config_file.LogTarget()
      for dst_str, dst_re in iteritems(self.destinations):
        dst = dst_re.match(action)
        if dst:
          rslt.transport = dst_str
          rslt.destination = dst.group(1)
          break
      return rslt
docs: Extract log configuration data from rsyslog actions.
  
      Actions have the format:
        <facility>/<severity> <type_def><destination>;<template>
        e.g. *.* @@loghost.example.com.:514;RSYSLOG_ForwardFormat
  
      Actions are selected by a type definition. These include:
        "@@": TCP syslog
        "@": UDP syslog
        "|": Named pipe
        "~": Drop to /dev/null
        "^": Shell script
        ":om<string>:": An output module
        Or a file path.
  
      Args:
        action: The action string from rsyslog.
  
      Returns:
        a rdfvalue.LogTarget message.