Added README

This commit is contained in:
Didip Kerabat 2014-07-18 15:45:49 -07:00
parent 5c909080d7
commit 58cc2b3fec
1 changed files with 20 additions and 0 deletions

20
hooks/syslog/README.md Normal file
View File

@ -0,0 +1,20 @@
# Syslog Hooks for Logrus <img src="http://i.imgur.com/hTeVwmJ.png" width="40" height="40" alt=":walrus:" class="emoji" title=":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)
}
}
```