1
0
mirror of https://github.com/woodpecker-ci/woodpecker.git synced 2025-01-05 10:20:36 +02:00
woodpecker/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_test.go updated vendor files and paths 2015-09-29 18:21:17 -07:00
syslog.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)
  }
}