Merge pull request #6152 from dwagin/master
Bump up github.com/hashicorp/go-syslog for better BSD support
This commit is contained in:
commit
ee0bfe1926
2
vendor/github.com/hashicorp/go-syslog/builtin.go
generated
vendored
2
vendor/github.com/hashicorp/go-syslog/builtin.go
generated
vendored
|
@ -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)
|
||||
|
|
1
vendor/github.com/hashicorp/go-syslog/go.mod
generated
vendored
Normal file
1
vendor/github.com/hashicorp/go-syslog/go.mod
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
module github.com/hashicorp/go-syslog
|
19
vendor/github.com/hashicorp/go-syslog/unix.go
generated
vendored
19
vendor/github.com/hashicorp/go-syslog/unix.go
generated
vendored
|
@ -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
|
||||
|
|
7
vendor/github.com/hashicorp/go-syslog/unsupported.go
generated
vendored
7
vendor/github.com/hashicorp/go-syslog/unsupported.go
generated
vendored
|
@ -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")
|
||||
}
|
||||
|
|
2
vendor/vendor.json
vendored
2
vendor/vendor.json
vendored
|
@ -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","version":"v1.0.0","versionExact":"v1.0.0"},
|
||||
{"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"},
|
||||
|
|
Loading…
Reference in a new issue