Updated: April 19, 2023 |
Send a message to the system logger (varargs)
#include <stdio.h> #include <sys/slog.h> int vslogf( int opcode, int severity, const char * fmt, va_list arg );
Use major codes in the range _SLOGC_PRIVATE_START and _SLOGC_PRIVATE_END in your applications, keeping in mind that many applications already use _SLOGC_TEST, which is (_SLOGC_PRIVATE_START + 0).
libc
Use the -l c option to qcc to link against this library. This library is usually included automatically.
The slog*() functions send log messages to the system logger, slogger2. To send formatted messages, use vslogf(). If you have programs that scan log files for specified codes, you can use slogb() or slogi() to send a block of structures or int's, respectively.
This function is a varargs version of slogf().
Safety: | |
---|---|
Cancellation point | Yes |
Interrupt handler | No |
Signal handler | Yes |
Thread | Yes |