From f99f6d738486204bdf2048c3f75abd03bb380829 Mon Sep 17 00:00:00 2001 From: Dmitry Date: Mon, 19 Aug 2019 12:17:01 +0300 Subject: [PATCH] Bump up github.com/hashicorp/go-syslog --- .../github.com/hashicorp/go-syslog/builtin.go | 2 +- vendor/github.com/hashicorp/go-syslog/unix.go | 19 ++++++++++++++++++- .../hashicorp/go-syslog/unsupported.go | 7 ++++++- vendor/vendor.json | 2 +- 4 files changed, 26 insertions(+), 4 deletions(-) diff --git a/vendor/github.com/hashicorp/go-syslog/builtin.go b/vendor/github.com/hashicorp/go-syslog/builtin.go index 56f593a3a..72bdd61c9 100644 --- a/vendor/github.com/hashicorp/go-syslog/builtin.go +++ b/vendor/github.com/hashicorp/go-syslog/builtin.go @@ -199,7 +199,7 @@ func (n *netConn) close() error { // local machine using a Unix domain socket. func unixSyslog() (conn serverConn, err error) { logTypes := []string{"unixgram", "unix"} - logPaths := []string{"/dev/log", "/var/run/syslog"} + logPaths := []string{"/dev/log", "/var/run/syslog", "/var/run/log"} for _, network := range logTypes { for _, path := range logPaths { conn, err := net.DialTimeout(network, path, localDeadline) diff --git a/vendor/github.com/hashicorp/go-syslog/unix.go b/vendor/github.com/hashicorp/go-syslog/unix.go index 8b1af3ec0..70b71802e 100644 --- a/vendor/github.com/hashicorp/go-syslog/unix.go +++ b/vendor/github.com/hashicorp/go-syslog/unix.go @@ -1,4 +1,4 @@ -// +build linux darwin freebsd openbsd solaris +// +build linux darwin dragonfly freebsd netbsd openbsd solaris package gsyslog @@ -28,6 +28,23 @@ func NewLogger(p Priority, facility, tag string) (Syslogger, error) { return &builtinLogger{l}, nil } +// DialLogger is used to construct a new Syslogger that establishes connection to remote syslog server +func DialLogger(network, raddr string, p Priority, facility, tag string) (Syslogger, error) { + fPriority, err := facilityPriority(facility) + if err != nil { + return nil, err + } + + priority := syslog.Priority(p) | fPriority + + l, err := dialBuiltin(network, raddr, priority, tag) + if err != nil { + return nil, err + } + + return &builtinLogger{l}, nil +} + // WriteLevel writes out a message at the given priority func (b *builtinLogger) WriteLevel(p Priority, buf []byte) error { var err error diff --git a/vendor/github.com/hashicorp/go-syslog/unsupported.go b/vendor/github.com/hashicorp/go-syslog/unsupported.go index 30a6d5c20..b8ca3a5c7 100644 --- a/vendor/github.com/hashicorp/go-syslog/unsupported.go +++ b/vendor/github.com/hashicorp/go-syslog/unsupported.go @@ -1,4 +1,4 @@ -// +build windows plan9 netbsd +// +build windows plan9 nacl package gsyslog @@ -10,3 +10,8 @@ import ( func NewLogger(p Priority, facility, tag string) (Syslogger, error) { return nil, fmt.Errorf("Platform does not support syslog") } + +// DialLogger is used to construct a new Syslogger that establishes connection to remote syslog server +func DialLogger(network, raddr string, p Priority, facility, tag string) (Syslogger, error) { + return nil, fmt.Errorf("Platform does not support syslog") +} diff --git a/vendor/vendor.json b/vendor/vendor.json index 68b09ed4e..c0eef1ff1 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -210,7 +210,7 @@ {"path":"github.com/hashicorp/go-safetemp","checksumSHA1":"CduvzBFfTv77nhjtXPGdIjQQLMI=","revision":"b1a1dbde6fdc11e3ae79efd9039009e22d4ae240","revisionTime":"2018-03-26T21:11:50Z"}, {"path":"github.com/hashicorp/go-sockaddr","checksumSHA1":"J47ySO1q0gcnmoMnir1q1loKzCk=","revision":"6d291a969b86c4b633730bfc6b8b9d64c3aafed9","revisionTime":"2018-03-20T11:50:54Z"}, {"path":"github.com/hashicorp/go-sockaddr/template","checksumSHA1":"PDp9DVLvf3KWxhs4G4DpIwauMSU=","revision":"6d291a969b86c4b633730bfc6b8b9d64c3aafed9","revisionTime":"2018-03-20T11:50:54Z"}, - {"path":"github.com/hashicorp/go-syslog","checksumSHA1":"xZ7Ban1x//6uUIU1xtrTbCYNHBc=","revision":"42a2b573b664dbf281bd48c3cc12c086b17a39ba"}, + {"path":"github.com/hashicorp/go-syslog","checksumSHA1":"eEqQGKsFOdSAwEprYgYnL7+J2e0=","revision":"8d1874e3e8d1862b74e0536851e218c4571066a5","revisionTime":"2019-01-18T15:19:36Z"}, {"path":"github.com/hashicorp/go-uuid","checksumSHA1":"5AxXPtBqAKyFGcttFzxT5hp/3Tk=","revision":"4f571afc59f3043a65f8fe6bf46d887b10a01d43","revisionTime":"2018-11-28T13:14:45Z"}, {"path":"github.com/hashicorp/go-version","checksumSHA1":"r0pj5dMHCghpaQZ3f1BRGoKiSWw=","revision":"b5a281d3160aa11950a6182bd9a9dc2cb1e02d50","revisionTime":"2018-08-24T00:43:55Z"}, {"path":"github.com/hashicorp/golang-lru","checksumSHA1":"d9PxF1XQGLMJZRct2R8qVM/eYlE=","revision":"a0d98a5f288019575c6d1f4bb1573fef2d1fcdc4","revisionTime":"2016-02-07T21:47:19Z"},