![]() |
Defines | |
#define | SYSLOG_MAXBUF 256 |
Syslog message buffer size. | |
Functions | |
void | vsyslog (int pri, CONST char *fmt, va_list ap) |
Print log message. | |
void | syslog (int pri, CONST char *fmt,...) |
Print log message. | |
void | vsyslog_P (int pri, PGM_P fmt, va_list ap) |
Print log message. | |
void | syslog_P (int pri, PGM_P fmt,...) |
Print log message. | |
int | setlogmask (int logmask) |
Set the log priority mask level. | |
uint32_t | setlogserver (uint32_t ip, uint16_t port) |
Set the log server's IP address. | |
void | openlog (CONST char *ident, int logstat, int logfac) |
Open logging for specialized processing. | |
void | closelog (void) |
Release system resources occupied by syslog(). |
#define SYSLOG_MAXBUF 256 |
Syslog message buffer size.
Definition at line 116 of file syslog.c.
Referenced by openlog(), vsyslog(), and vsyslog_P().
void vsyslog | ( | int | pri, | |
CONST char * | fmt, | |||
va_list | ap | |||
) |
Print log message.
Alternate form of syslog(), in which the arguments have already been captured using the variable-length argument facilities.
pri | Priority level of this message. See syslog(). | |
fmt | Format string containing conversion specifications like printf. | |
ap | List of arguments. |
Definition at line 142 of file syslog.c.
References _fileno(), _write(), confos, _CONFOS::hostname, localtime(), LOG_FACMASK, LOG_MASK, LOG_NDELAY, LOG_PERROR, LOG_PRI, LOG_PRIMASK, NutUdpSendTo(), openlog(), sprintf, stderr, strcat(), strlen(), SYSLOG_MAXBUF, time(), _tm::tm_hour, _tm::tm_mday, _tm::tm_min, _tm::tm_mon, _tm::tm_sec, and vsprintf().
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. |
Definition at line 222 of file syslog.c.
References vsyslog().
void vsyslog_P | ( | int | pri, | |
PGM_P | fmt, | |||
va_list | ap | |||
) |
Print log message.
Alternate form of syslog(), in which the arguments have already been captured using the variable-length argument facilities.
pri | Priority level of this message. See syslog(). | |
fmt | Format string containing conversion specifications like printf. | |
ap | List of arguments. |
Definition at line 242 of file syslog.c.
References _fileno(), _write(), confos, _CONFOS::hostname, localtime(), LOG_FACMASK, LOG_MASK, LOG_NDELAY, LOG_PERROR, LOG_PRI, LOG_PRIMASK, NutUdpSendTo(), openlog(), sprintf, stderr, strcat(), strlen(), strlen_P, SYSLOG_MAXBUF, time(), _tm::tm_hour, _tm::tm_mday, _tm::tm_min, _tm::tm_mon, _tm::tm_sec, and vsprintf_P().
void syslog_P | ( | int | pri, | |
PGM_P | 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. |
Definition at line 322 of file syslog.c.
References vsyslog_P().
int setlogmask | ( | int | logmask | ) |
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:
|
Definition at line 403 of file syslog.c.
References closelog(), LOG_NDELAY, malloc, NutUdpCreateSocket(), strcpy(), strlen(), and SYSLOG_MAXBUF.
void closelog | ( | void | ) |
Release system resources occupied by syslog().
Definition at line 434 of file syslog.c.
References free, and NutUdpDestroySocket().