forked from mirror/logrus
2a6183b106 | ||
---|---|---|
.. | ||
README.md | ||
syslog.go | ||
syslog_test.go |
README.md
Syslog Hooks for Logrus
Usage
import (
"log/syslog"
"github.com/Sirupsen/logrus"
"github.com/Sirupsen/logrus/hooks/syslog"
)
func main() {
log := logrus.New()
hook, err := logrus_syslog.NewSyslogHook("udp", "localhost:514", syslog.LOG_INFO, "")
if err == nil {
log.Hooks.Add(hook)
}
}