Query: vsyslog
OS: sunos
Section: 3c
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
vsyslog(3C) Standard C Library Functions vsyslog(3C)NAMEvsyslog - log message with a stdarg argument listSYNOPSIS#include <syslog.h> #include <stdarg.h> int vsyslog(int priority, const char *message, va_list ap);DESCRIPTIONThe vsyslog() function is identical to syslog(3C), except that it is called with an argument list as defined by <stdarg.h> rather than with a variable number of arguments.EXAMPLESExample 1: Use vsyslog() to write an error routine. The following demonstrates how vsyslog() can be used to write an error routine. #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()); }ATTRIBUTESSee attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |MT-Level |Safe | +-----------------------------+-----------------------------+SEE ALSOsyslog(3C), attributes(5) SunOS 5.10 15 Nov 1999 vsyslog(3C)
Related Man Pages |
---|
vfprintf(3c) - sunos |
setlogmask(3) - freebsd |
vsprintf(3c) - sunos |
vsnprintf(3c) - sunos |
vsyslog(3c) - sunos |
Similar Topics in the Unix Linux Community |
---|
syslog.log - hp-ux |
syslog file |
writing the log file into syslog |
Openlog and syslog in red-hat Linux doesn't write any thing to /var/log/* |