logrus/hooks/syslog
Didip Kerabat 426748f339 Merge branch 'master' of github.com:didip/logrus 2014-07-27 22:05:06 -07:00
..
README.md Update frontpage README 2014-07-18 15:47:34 -07:00
syslog.go Call entry.String() directly. 2014-07-27 22:04:55 -07:00
syslog_test.go go fmt 2014-07-27 22:01:56 -07:00

README.md

Syslog Hooks for Logrus :walrus:

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)
  }
}