mirror of
https://github.com/cwinfo/matterbridge.git
synced 2025-07-05 09:24:03 +00:00
Update mattermost library (#2152)
* Update mattermost library * Fix linting
This commit is contained in:
10
vendor/github.com/mattermost/logr/v2/targets/syslog.go
generated
vendored
10
vendor/github.com/mattermost/logr/v2/targets/syslog.go
generated
vendored
@ -1,3 +1,4 @@
|
||||
//go:build !windows && !nacl && !plan9
|
||||
// +build !windows,!nacl,!plan9
|
||||
|
||||
package targets
|
||||
@ -19,7 +20,7 @@ type Syslog struct {
|
||||
|
||||
// SyslogOptions provides parameters for dialing a syslog daemon.
|
||||
type SyslogOptions struct {
|
||||
IP string `json:"ip,omitempty"` // deprecated
|
||||
IP string `json:"ip,omitempty"` // deprecated (use Host instead)
|
||||
Host string `json:"host"`
|
||||
Port int `json:"port"`
|
||||
TLS bool `json:"tls"`
|
||||
@ -55,6 +56,11 @@ func (s *Syslog) Init() error {
|
||||
network := "tcp"
|
||||
var config *tls.Config
|
||||
|
||||
host := s.params.Host
|
||||
if host == "" {
|
||||
host = s.params.IP
|
||||
}
|
||||
|
||||
if s.params.TLS {
|
||||
network = "tcp+tls"
|
||||
config = &tls.Config{InsecureSkipVerify: s.params.Insecure}
|
||||
@ -66,7 +72,7 @@ func (s *Syslog) Init() error {
|
||||
config.RootCAs = pool
|
||||
}
|
||||
}
|
||||
raddr := fmt.Sprintf("%s:%d", s.params.IP, s.params.Port)
|
||||
raddr := fmt.Sprintf("%s:%d", host, s.params.Port)
|
||||
if raddr == ":0" {
|
||||
// If no IP:port provided then connect to local syslog.
|
||||
raddr = ""
|
||||
|
Reference in New Issue
Block a user