Skip to content

Commit

Permalink
unix socket - fix protocol wrong type for socket (#598)
Browse files Browse the repository at this point in the history
  • Loading branch information
dmachard authored Feb 6, 2024
1 parent 3c0df2b commit 69b3d61
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion loggers/syslog.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,14 @@ func (s *Syslog) ConnectToRemote() {
case "local":
s.LogInfo("connecting to local syslog...")
logWriter, err = syslog.New(s.facility|s.severity, "")
case netlib.SocketUnix, netlib.SocketUDP, netlib.SocketTCP:
case netlib.SocketUnix:
s.LogInfo("connecting to %s://%s ...",
s.config.Loggers.Syslog.Transport,
s.config.Loggers.Syslog.RemoteAddress)
logWriter, err = syslog.Dial("",
s.config.Loggers.Syslog.RemoteAddress, s.facility|s.severity,
s.config.Loggers.Syslog.Tag)
case netlib.SocketUDP, netlib.SocketTCP:
s.LogInfo("connecting to %s://%s ...",
s.config.Loggers.Syslog.Transport,
s.config.Loggers.Syslog.RemoteAddress)
Expand Down

0 comments on commit 69b3d61

Please sign in to comment.