logrus/hooks/syslog
Roman Konz 5e322e5cfe Update README.md - changed conflicting imports 2014-12-05 11:00:48 +01:00
..
README.md Update README.md - changed conflicting imports 2014-12-05 11:00:48 +01:00
syslog.go syslog: let syslog output lookup level directly in Entry struct 2014-11-23 18:02:34 +01: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"
  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)
  }
}