slog2_set_default_buffer()

Set the default slog2 logging buffer

Synopsis:

#include <sys/slog2.h>

slog2_buffer_t slog2_set_default_buffer( slog2_buffer_t buffer );

Arguments:

buffer
One of:
  • the handle of a buffer, allocated by slog2_register(), where you want the default logs to go
  • NULL if you want to disable default logging
  • -1 to get the default buffer handle

Library:

libslog2

Use the -l slog2 option to qcc to link against this library.

Description:

The slog2_set_default_buffer() function sets the default logging buffer. If you call the slog2 logging APIs with a NULL buffer handle, the log is written to the default logging buffer set by this function.

If buffer is NULL, default logging is disabled. If buffer is -1, the default buffer handle is returned.

Returns:

The previous default buffer handle.

Classification:

QNX Neutrino

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