1 // Copyright 2009 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
12 // unixSyslog opens a connection to the syslog daemon running on the
13 // local machine using a Unix domain socket.
15 func unixSyslog() (conn serverConn, err error) {
16 logTypes := []string{"unixgram", "unix"}
17 logPaths := []string{"/dev/log", "/var/run/syslog"}
19 for _, network := range logTypes {
20 for _, path := range logPaths {
22 conn, err := net.Dial(network, raddr)
26 return netConn{conn}, nil
30 return nil, errors.New("Unix syslog delivery error")