diff --git a/README.md b/README.md index 41e23ef..fb98376 100644 --- a/README.md +++ b/README.md @@ -148,12 +148,15 @@ Logrus comes with built-in hooks. Add those, or your custom hook, in `init`: ```go import ( + "log/syslog" "github.com/Sirupsen/logrus" "github.com/Sirupsen/logrus/hooks/airbrake" + "github.com/Sirupsen/logrus/hooks/syslog" ) func init() { log.Hooks.Add(new(logrus_airbrake.AirbrakeHook)) + log.Hooks.Add(logrus_syslog.NewSyslogHook("udp", "localhost:514", syslog.LOG_INFO, "")) } ``` diff --git a/hooks/syslog/README.md b/hooks/syslog/README.md index 74dc73f..cd706bc 100644 --- a/hooks/syslog/README.md +++ b/hooks/syslog/README.md @@ -11,7 +11,7 @@ import ( func main() { log := logrus.New() - hook, err := NewSyslogHook("udp", "localhost:514", syslog.LOG_INFO, "") + hook, err := logrus_syslog.NewSyslogHook("udp", "localhost:514", syslog.LOG_INFO, "") if err == nil { log.Hooks.Add(hook)