示例#1
0
func NewSyslogSink(namespace string) *Syslog {
	writer, err := syslog.New(syslog.LOG_DEBUG, namespace)
	if err != nil {
		panic(errors.New("Could not setup logging to syslog: " + err.Error()))
	}

	syslog := new(Syslog)
	syslog.writer = writer
	return syslog
}
示例#2
0
func NewSyslogSink(namespace string) *Syslog {
	writer, err := syslog.New(syslog.LOG_DEBUG, namespace)
	if err != nil {
		panic(err)
	}

	syslog := new(Syslog)
	syslog.writer = writer
	return syslog
}