slogb()

Send a message to the system logger

Synopsis:

#include <stdio.h>
#include <sys/slog.h>

int slogb( int code, 
           int severity, 
           void * data, 
           int size );

Arguments:

opcode
A combination of a major and minor code.
severity
The severity of the log message; see Severity levels,” in the documentation for slogf().
data
A block of raw data.
size
The size of the raw data.

Library:

libc

Use the -l c option to qcc to link against this library. This library is usually included automatically.

Note: This function is in libc.a, but not in libc.so (in order to save space).

Description:

The slog*() functions send log messages to the system logger, slogger2. 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 ints, respectively.

Errors:

Any value from the Errors section in MsgSend(), as well as:

EACCES
Insufficient permission to write to the log file.
ENOENT
Invalid log file or directory specified, or slogger2 isn't running.

Examples:

See slogf().

Classification:

QNX Neutrino

Safety:  
Cancellation point Yes
Interrupt handler No
Signal handler Yes
Thread Yes