[Previous] [Contents] [Next]

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 );

Library:

libc

Description:

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.

The arguments for slogb() are as follows:

opcode
A combination of a major and minor code.
severity
The severity of the log message.
data
A block of raw data.
size
The size of the raw data.

Errors:

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

EACCES
Insufficient permission to write to the log file.
EINVAL
The size of the data buffer exceeds 255*4 bytes, or an odd number of bytes is being read.
ENOENT
Invalid log file or directory specified, or slogger isn't running.

Examples:

See slogf().

Classification:

QNX 6

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

See also:

slogf(), slogi(), vslogf()

slogger, sloginfo in the Utilities reference


[Previous] [Contents] [Next]