Codebase list golang-github-hashicorp-go-syslog / ae9665a
Update upstream source from tag 'upstream/1.0.0' Update to upstream version '1.0.0' with Debian dir 86c0bc93bbbc2f2a04c715e3b7bc195b09d1be2f Shengjing Zhu 3 years ago
5 changed file(s) with 48 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
0 # Compiled Object files, Static and Dynamic libs (Shared Objects)
1 *.o
2 *.a
3 *.so
4
5 # Folders
6 _obj
7 _test
8
9 # Architecture specific extensions/prefixes
10 *.[568vq]
11 [568vq].out
12
13 *.cgo1.go
14 *.cgo2.c
15 _cgo_defun.c
16 _cgo_gotypes.go
17 _cgo_export.*
18
19 _testmain.go
20
21 *.exe
198198 // local machine using a Unix domain socket.
199199 func unixSyslog() (conn serverConn, err error) {
200200 logTypes := []string{"unixgram", "unix"}
201 logPaths := []string{"/dev/log", "/var/run/syslog"}
201 logPaths := []string{"/dev/log", "/var/run/syslog", "/var/run/log"}
202202 for _, network := range logTypes {
203203 for _, path := range logPaths {
204204 conn, err := net.DialTimeout(network, path, localDeadline)
0 module github.com/hashicorp/go-syslog
0 // +build linux darwin freebsd openbsd solaris
0 // +build linux darwin dragonfly freebsd netbsd openbsd solaris
11
22 package gsyslog
33
2424 if err != nil {
2525 return nil, err
2626 }
27 return &builtinLogger{l}, nil
28 }
29
30 // DialLogger is used to construct a new Syslogger that establishes connection to remote syslog server
31 func DialLogger(network, raddr string, p Priority, facility, tag string) (Syslogger, error) {
32 fPriority, err := facilityPriority(facility)
33 if err != nil {
34 return nil, err
35 }
36
37 priority := syslog.Priority(p) | fPriority
38
39 l, err := dialBuiltin(network, raddr, priority, tag)
40 if err != nil {
41 return nil, err
42 }
43
2744 return &builtinLogger{l}, nil
2845 }
2946
0 // +build windows plan9 netbsd
0 // +build windows plan9 nacl
11
22 package gsyslog
33
99 func NewLogger(p Priority, facility, tag string) (Syslogger, error) {
1010 return nil, fmt.Errorf("Platform does not support syslog")
1111 }
12
13 // DialLogger is used to construct a new Syslogger that establishes connection to remote syslog server
14 func DialLogger(network, raddr string, p Priority, facility, tag string) (Syslogger, error) {
15 return nil, fmt.Errorf("Platform does not support syslog")
16 }