Defines | |
#define | SYSLOG_MAXBUF 256 |
Syslog message buffer size. | |
Functions | |
void | closelog (void) |
Release system resources occupied by syslog(). | |
void | openlog (CONST char *ident, int logstat, int logfac) |
Open logging for specialized processing. | |
int | setlogmask (int logmask) |
Set the log priority mask level. | |
u_long | setlogserver (u_long ip, u_short port) |
Set the log server's IP address. | |
void | syslog (int pri, CONST char *fmt,...) |
Print log message. | |
void | vsyslog (int pri, CONST char *fmt, va_list ap) |
Print log message. |
void openlog | ( | CONST char * | ident, | |
int | logstat, | |||
int | logfac | |||
) |
Open logging for specialized processing.
This function provides for more specialized processing of the messages sent by syslog() and vsyslog().
ident | This string that will be prepended to every message. | |
logstat | A bit field specifying logging options, which is formed by OR'ing one or more of the following values:
| |
logfac | Encodes a default facility to be assigned to all messages that do not have an explicit facility encoded:
|
int setlogmask | ( | int | logmask | ) |
Set the log priority mask level.
Calls to syslog() with a priority not set are ignored. The default allows all priorities to be logged.
logmask | New priority mask. |
Set the log server's IP address.
ip | IP address in network byte order. If 0, no messages will be sent out. | |
port | Port number. If 0, then standard port is used. |
void syslog | ( | int | pri, | |
CONST char * | fmt, | |||
... | ||||
) |
Print log message.
The message is tagged with priority.
pri | Priority level of this message, selected from the following ordered list (high to low):
| |
fmt | Format string containing conversion specifications like printf. |
void vsyslog | ( | int | pri, | |
CONST char * | fmt, | |||
va_list | ap | |||
) |