Send a message to the system logger
#include <stdio.h> #include <sys/slog.h> int slogb( int code, int severity, void * data, int size );
- A combination of a major and minor code.
- The severity of the log message; see " Severity levels," in the documentation for slogf().
- A block of raw data.
- The size of the raw data.
Use the -l c option to qcc to link against this library. This library is usually included automatically.
This function is in libc.a, but not in libc.so (in order to save space).
The slog*() functions send log messages to the system logger, slogger . To send formatted messages, use slogf() . 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.
Any value from the Errors section in MsgSend() , as well as:
- Insufficient permission to write to the log file.
- The size of the data buffer exceeds 255×4 bytes, or an odd number of bytes is being read.
- Invalid log file or directory specified, or slogger isn't running.
See slogf() .
Last modified: 2013-12-23