harness-drone/vendor/github.com/Sirupsen/logrus/hooks/syslog
2015-09-29 18:21:17 -07:00
..
README.md moving from Godeps to Go 1.5 vendoring 2015-09-29 17:34:44 -07:00
syslog.go updated vendor files and paths 2015-09-29 18:21:17 -07:00
syslog_test.go updated vendor files and paths 2015-09-29 18:21:17 -07:00

Syslog Hooks for Logrus :walrus:

Usage

import (
  "log/syslog"
  "github.com/Sirupsen/logrus"
  logrus_syslog "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)
  }
}