mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
You were a useful port and you've served your purpose. Thanks for all the play. A subsequent CL will remove amd64p32 (including assembly files and toolchain bits) and remaining bits. The amd64p32 removal will be separated into its own CL in case we want to support the Linux x32 ABI in the future and want our old amd64p32 support as a starting point. Updates #30439 Change-Id: Ia3a0c7d49804adc87bf52a4dea7e3d3007f2b1cd Reviewed-on: https://go-review.googlesource.com/c/go/+/199499 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
29 lines
754 B
Go
29 lines
754 B
Go
// Copyright 2009 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
// +build !windows,!plan9
|
|
|
|
package syslog
|
|
|
|
import (
|
|
"errors"
|
|
"net"
|
|
)
|
|
|
|
// unixSyslog opens a connection to the syslog daemon running on the
|
|
// local machine using a Unix domain socket.
|
|
|
|
func unixSyslog() (conn serverConn, err error) {
|
|
logTypes := []string{"unixgram", "unix"}
|
|
logPaths := []string{"/dev/log", "/var/run/syslog", "/var/run/log"}
|
|
for _, network := range logTypes {
|
|
for _, path := range logPaths {
|
|
conn, err := net.Dial(network, path)
|
|
if err == nil {
|
|
return &netConn{conn: conn, local: true}, nil
|
|
}
|
|
}
|
|
}
|
|
return nil, errors.New("Unix syslog delivery error")
|
|
}
|