#include <syslog.h> openlog(ident, arg1, arg2) char *ident; int arg1; int arg2; syslog(priority, message, parameters ... ) char *message; closelog()
Each log message is tagged with a priority, defined in the header file. Various filtering mechanisms are used on other systems to direct the different levels to different destinations.
The message looks like a printf(3) string except that %m is replaced by the current error message (collected from errno). A newline will be output if the the format string doesn't end with one.
The openlog routine can be called to initialize the logger. This routine takes three parameters. The first is a text string to be output before each message; it is conventionally the program name. The other two parameters are currently ignored, and should be supplied for compatibility.
The closelog routine can be used to close the log file.