code: func (a *Adapter) Stream(logstream chan *router.Message) {
  	for message := range logstream {
  		m := &Message{message}
  		buf, err := m.Render(a.tmpl)
  		if err != nil {
  			log.Println("syslog:", err)
  			return
  		}
  		if _, err = a.conn.Write(buf); err != nil {
  			log.Println("syslog:", err)
  			switch a.conn.(type) {
  			case *net.UDPConn:
  				continue
  			default:
  				if err = a.retry(buf, err); err != nil {
  					log.Panicf("syslog retry err: %+v", err)
  					return
  				}
  			}
  		}
  	}
  }
docs: // Stream sends log data to a connection