Пример #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
}