1
0
mirror of https://github.com/woodpecker-ci/woodpecker.git synced 2024-12-18 08:26:45 +02:00
woodpecker/vendor/github.com/Sirupsen/logrus/hooks/syslog
2015-09-29 17:34:44 -07:00
..
README.md moving from Godeps to Go 1.5 vendoring 2015-09-29 17:34:44 -07:00
syslog_test.go moving from Godeps to Go 1.5 vendoring 2015-09-29 17:34:44 -07:00
syslog.go moving from Godeps to Go 1.5 vendoring 2015-09-29 17:34:44 -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)
  }
}