From 58cc2b3fec9c4cce0e5797fc26db6d4d23842c82 Mon Sep 17 00:00:00 2001 From: Didip Kerabat Date: Fri, 18 Jul 2014 15:45:49 -0700 Subject: [PATCH] Added README --- hooks/syslog/README.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 hooks/syslog/README.md diff --git a/hooks/syslog/README.md b/hooks/syslog/README.md new file mode 100644 index 0000000..74dc73f --- /dev/null +++ b/hooks/syslog/README.md @@ -0,0 +1,20 @@ +# Syslog Hooks for Logrus :walrus: + +## Usage + +```go +import ( + "log/syslog" + "github.com/Sirupsen/logrus" + "github.com/Sirupsen/logrus/hooks/syslog" +) + +func main() { + log := logrus.New() + hook, err := NewSyslogHook("udp", "localhost:514", syslog.LOG_INFO, "") + + if err == nil { + log.Hooks.Add(hook) + } +} +``` \ No newline at end of file