...
Source file
src/log/syslog/syslog_unix.go
1
2
3
4
5
6
7
8 package syslog
9
10 import (
11 "errors"
12 "net"
13 )
14
15
16
17
18 func unixSyslog() (conn serverConn, err error) {
19 logTypes := []string{"unixgram", "unix"}
20 logPaths := []string{"/dev/log", "/var/run/syslog", "/var/run/log"}
21 for _, network := range logTypes {
22 for _, path := range logPaths {
23 conn, err := net.Dial(network, path)
24 if err == nil {
25 return &netConn{conn: conn, local: true}, nil
26 }
27 }
28 }
29 return nil, errors.New("Unix syslog delivery error")
30 }
31
View as plain text