Log a constant string in a slog2 buffer
Synopsis:
#include <slog2.h>
int slog2c( slog2_buffer_t buffer,
_Uint16t code,
_Uint8t severity,
const char* data );
Arguments:
-
buffer
- The handle of the buffer you want to log the message in, or NULL
to use the default buffer that you specified earlier with
slog2_set_default_buffer()
.
-
code
- A user-specified code that you want to be associated with the message.
The slog2 system doesn't interpret this code in any way.
-
severity
- The severity level of this log item; one of:
-
SLOG2_SHUTDOWN
-
SLOG2_CRITICAL
-
SLOG2_ERROR
-
SLOG2_WARNING
-
SLOG2_NOTICE
-
SLOG2_INFO
-
SLOG2_DEBUG1
-
SLOG2_DEBUG2
For more information, see the entry for
slog2_register()
.
-
data
- A pointer to the constant string that you want to log in the buffer.
Library:
libslog2
Use the -l slog2 option to
qcc
to link against this library.
Description:
The slog2c() function logs a constant string to the slog2 buffer.
Returns:
0 on success, or -1 if an error occurred.
Classification:
QNX Neutrino
| Safety: |
|
| Cancellation point |
No |
| Interrupt handler |
Yes |
| Signal handler |
Yes |
| Thread |
Yes |