logrus/hooks/syslog
Didip Kerabat 58cc2b3fec Added README 2014-07-18 15:45:49 -07:00
..
README.md Added README 2014-07-18 15:45:49 -07:00
syslog.go SyslogHook 2014-07-18 00:28:40 -07:00
syslog_test.go SyslogHook 2014-07-18 00:28:40 -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 := NewSyslogHook("udp", "localhost:514", syslog.LOG_INFO, "")

  if err == nil {
    log.Hooks.Add(hook)
  }
}