Subject: | setlogsock documentation incorrect |
The documentation of setlogsock doesn't correctly describe what names
Sys::Syslog tries for a Unix socket. It's also a little vague on what
"stream" means.
Here's an update for 0.16.
Subject: | setlogsock_doc.patch |
diff --unif --rec Sys-Syslog-0.16/Syslog.pm Sys-Syslog/Syslog.pm
--- Sys-Syslog-0.16/Syslog.pm 2006-06-20 21:22:31.000000000 +0000
+++ Sys-Syslog/Syslog.pm 2006-07-19 01:58:02.000000000 +0000
@@ -807,19 +810,29 @@
C<openlog()> or C<syslog()> and returns true on success,
C<undef> on failure.
-A value of C<"unix"> will connect to the UNIX domain socket (in some
-systems a character special device) returned by the C<_PATH_LOG> macro
-(if your system defines it), or F</dev/log> or F</dev/conslog>,
-whatever is writable. A value of C<"stream"> will connect to the stream
-indicated by the pathname provided as the optional second parameter.
-(For example Solaris and IRIX require C<"stream"> instead of C<"unix">.)
-A value of C<"native"> will use the native C functions from your C<syslog(3)>
-library.
-A value of C<"inet"> will connect to an INET socket (either C<tcp> or C<udp>,
-tried in that order) returned by C<getservbyname()>. C<"tcp"> and C<"udp">
-can also be given as values. The value C<"console"> will send messages
-directly to the console, as for the C<"cons"> option in the logopts in
-C<openlog()>.
+A value of C<"unix"> causes Sys::Syslog to use a UNIX domain socket (in some
+systems a character special device). The name of that socket is the
+second parameter or, if you omit the second parameter, the value
+returned by the C<_PATH_LOG> macro (if your system defines it).
+, or
+F</dev/log> or F</dev/conslog>, whatever is writable.
+
+A value of C<"stream"> causes Sys::Syslog to use a device special file.
+The name of that file is the second parameter or, if you omit the second
+parameter, the value
+returned by the C<_PATH_LOG> macro. If your system doesn't define
+C<_PATH_LOG>, C<setlogsock()> tries F</dev/log>, then F</dev/conslog>
+and uses the first one it finds to exist and be writable.
+(Solaris and IRIX require C<"stream"> instead of C<"unix">.)
+
+A value of C<"native"> causes Sys::Syslog to use the native C
+functions from your C<syslog(3)> library.
+
+A value of C<"inet"> causes Sys::Syslog to use an INET socket (either
+C<tcp> or C<udp>, tried in that order) returned by
+C<getservbyname()>. C<"tcp"> and C<"udp"> can also be given as
+values. The value C<"console"> will send messages directly to the
+console, as for the C<"cons"> option in the logopts in C<openlog()>.
A reference to an array can also be passed as the first parameter.
When this calling method is used, the array should contain a list of