mirror of https://github.com/sirupsen/logrus.git
c0b1ea991b
Log level has moved from `entry.Data["level"]` to `entry.Level`. Use that to get the right level. Fix: #82 |
||
---|---|---|
.. | ||
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)
}
}