Hallo, dies ist ein Test.
PWD: /www/data-lst1/unixsoft/unixsoft/kaempfer/.public_html
Running in File Mode
Relative path: ./../../../../../../usr/man/man3c/vsyslog.3c
Real path: /usr/share/man/man3c/vsyslog.3c
Zurück
'\" te .\" Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. .TH vsyslog 3C "30 Aug 2006" "Oracle Solaris 11.4" "Standard C Library Functions" .SH NAME vsyslog \- log message with a stdarg argument list .SH SYNOPSIS .LP .nf #include <syslog.h> #include <stdarg.h> \fBvoid\fR \fBvsyslog\fR(\fBint\fR \fIpriority\fR, \fBconst char *\fR\fImessage\fR, \fBva_list\fR \fIap\fR); .fi .SH DESCRIPTION .sp .LP The \fBvsyslog()\fR function is identical to \fBsyslog\fR(3C), except that it is called with an argument list as defined by <\fBstdarg.h\fR> rather than with a variable number of arguments. .SH EXAMPLES .LP \fBExample 1\fR Use \fBvsyslog()\fR to write an error routine. .sp .LP The following example demonstrates the use of \fBvsyslog()\fR in writing an error routine. .sp .in +2 .nf #include <syslog.h> #include <stdarg.h> /* * error should be called like: * error(pri, function_name, format, arg1, arg2...); */ void error(int pri, char *function_name, char *format, ...) { va_list args; va_start(args, format); /* log name of function causing error */ (void) syslog(pri, "ERROR in %s.", function_name); /* log remainder of message */ (void) vsyslog(pri, format, args); va_end(args); (void) abort( ); } main() { error(LOG_ERR, "main", "process %d is dying", getpid()); } .fi .in -2 .sp .SH ATTRIBUTES .sp .LP See \fBattributes\fR(7) for descriptions of the following attributes: .sp .TS tab( ) box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPE ATTRIBUTE VALUE _ MT-Level Safe .TE .sp .SH SEE ALSO .sp .LP \fBsyslog\fR(3C), \fBattributes\fR(7)