Set the default slog2 logging buffer
#include <slog2.h> slog2_buffer_t slog2_set_default_buffer( slog2_buffer_t buffer );
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.
The previous default buffer handle.
Safety: | |
---|---|
Cancellation point | No |
Interrupt handler | No |
Signal handler | Yes |
Thread | Yes |