SYSLOG

Section: C Library Functions (3)
Updated: LOCAL
Index Return to Main Contents
 

NAME

syslog, openlog, closelog - logging routines  

SYNOPSIS

#include <syslog.h>

openlog(ident, arg1, arg2)
        char *ident;
        int arg1;
        int arg2;

syslog(priority, message, parameters ... )
        char *message;

closelog()
 

DESCRIPTION

Syslog is intended to provide a standard error and general notification interface. This version sends errors to the standard error; versions on other system use IPC mechanisms to talk to a logging daemon.

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.


 

Index

NAME
SYNOPSIS
DESCRIPTION

This document was created by man2html, using the manual pages.
Time: 21:52:09 GMT, February 02, 2023