1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #21613 from wzyboy/support-unixgram-syslog-address

Support unixgram syslog address
This commit is contained in:
Brian Goff 2016-04-28 11:06:17 -04:00
commit dbee44c9e0
4 changed files with 5 additions and 3 deletions

View file

@ -163,8 +163,8 @@ func parseAddress(address string) (string, string, error) {
return "", "", err
}
// unix socket validation
if url.Scheme == "unix" {
// unix and unixgram socket validation
if url.Scheme == "unix" || url.Scheme == "unixgram" {
if _, err := os.Stat(url.Path); err != nil {
return "", "", err
}

View file

@ -74,6 +74,7 @@ The following logging options are supported for the `syslog` logging driver:
--log-opt syslog-address=[tcp|udp|tcp+tls]://host:port
--log-opt syslog-address=unix://path
--log-opt syslog-address=unixgram://path
--log-opt syslog-facility=daemon
--log-opt syslog-tls-ca-cert=/etc/ca-certificates/custom/ca.pem
--log-opt syslog-tls-cert=/etc/ca-certificates/custom/cert.pem

View file

@ -11,7 +11,7 @@ var (
validPrefixes = map[string][]string{
"url": {"http://", "https://"},
"git": {"git://", "github.com/", "git@"},
"transport": {"tcp://", "tcp+tls://", "udp://", "unix://"},
"transport": {"tcp://", "tcp+tls://", "udp://", "unix://", "unixgram://"},
}
urlPathWithFragmentSuffix = regexp.MustCompile(".git(?:#.+)?$")
)

View file

@ -23,6 +23,7 @@ var (
"tcp+tls://example.com",
"udp://example.com",
"unix:///example",
"unixgram:///example",
}
)