]> Cypherpunks repositories - gostls13.git/commitdiff
log/syslog: document if network=="" for Dial, it will connect to local syslog server.
authorShenghou Ma <minux.ma@gmail.com>
Mon, 28 Apr 2014 18:29:45 +0000 (14:29 -0400)
committerShenghou Ma <minux.ma@gmail.com>
Mon, 28 Apr 2014 18:29:45 +0000 (14:29 -0400)
Fixes #7828.

LGTM=robert.hencke, iant, bradfitz
R=golang-codereviews, robert.hencke, iant, bradfitz
CC=golang-codereviews
https://golang.org/cl/97780045

src/pkg/log/syslog/syslog.go

index 1c7588e3656842e4a468bfdc0da90fb8f0b1ebb8..5e09599162693d51a7d80702b98250ca17b39598 100644 (file)
@@ -115,9 +115,10 @@ func New(priority Priority, tag string) (w *Writer, err error) {
 }
 
 // Dial establishes a connection to a log daemon by connecting to
-// address raddr on the network net.  Each write to the returned
+// address raddr on the specified network.  Each write to the returned
 // writer sends a log message with the given facility, severity and
 // tag.
+// If network is empty, Dial will connect to the local syslog server.
 func Dial(network, raddr string, priority Priority, tag string) (*Writer, error) {
        if priority < 0 || priority > LOG_LOCAL7|LOG_DEBUG {
                return nil, errors.New("log/syslog: invalid priority")