add vsyslog
authorKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Tue, 20 Dec 1988 09:10:59 +0000 (01:10 -0800)
committerKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Tue, 20 Dec 1988 09:10:59 +0000 (01:10 -0800)
SCCS-vsn: lib/libc/gen/syslog.3 6.8

usr/src/lib/libc/gen/syslog.3

index 8066baa..2b57b80 100644 (file)
@@ -13,7 +13,7 @@
 .\" IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
 .\" WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 .\"
 .\" IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
 .\" WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 .\"
-.\"    @(#)syslog.3    6.7 (Berkeley) %G%
+.\"    @(#)syslog.3    6.8 (Berkeley) %G%
 .\"
 .TH SYSLOG 3 ""
 .UC 5
 .\"
 .TH SYSLOG 3 ""
 .UC 5
@@ -28,7 +28,19 @@ syslog, openlog, closelog, setlogmask \- control system log
 .PP
 .B "syslog(priority, message, parameters ... )
 .br
 .PP
 .B "syslog(priority, message, parameters ... )
 .br
+.B "int priority;
+.br
+.B "char *message;
+.PP
+.B "#include <varargs.h>
+.br
+.B "vsyslog(priority, message, args)
+.br
+.B "int priority;
+.br
 .B "char *message;
 .B "char *message;
+.br
+.B "va_list args;
 .PP
 .B "closelog()
 .PP
 .PP
 .B "closelog()
 .PP
@@ -47,7 +59,13 @@ string except that
 .B %m
 is replaced by the current error message (collected from
 .IR errno ).
 .B %m
 is replaced by the current error message (collected from
 .IR errno ).
-A trailing newline is added if needed.
+A trailing newline is added if needed.  An alternate form,
+in which the arguments have already been captured using the
+variable-length argument facilities of
+.IR varargs (3),
+is available under the name
+.IR vsyslog .
+.PP
 This message will be read by
 .IR syslogd (8)
 and written to the system console, log files, or forwarded to
 This message will be read by
 .IR syslogd (8)
 and written to the system console, log files, or forwarded to