slogi()

QNX SDP8.0C Library ReferenceAPIDeveloper

Send a message to the system logger

Synopsis:

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

int slogi( int opcode, 
           int severity,
           int nargs,
            ... );

Arguments:

opcode
A combination of a major and minor code. Create the opcode using the _SLOG_SETCODE(major, minor) macro that's defined in <sys/slog.h>.

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

severity
The severity of the log message; see Severity levels, in the documentation for slogf().
nargs
The number of integers to send. A maximum of 32 integers is allowed.

The additional arguments are the integers that you want to write.

Library:

libc

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

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.
EINVAL
The size of the data buffer exceeded 32 integers.
ENOENT
Invalid log file or directory specified, or slogger2 isn't running.

Examples:

See slogf().

Classification:

QNX OS

Safety:
Cancellation pointYes
Signal handlerYes
ThreadYes
Page updated: