|
clibs
Tiny but handy utility libraries for C
|
Thread-local output stream implementation for clibs_logger. More...
#include "clibs_logging.h"
Macros | |
| #define | THREAD_LOCAL __thread |
Functions | |
| void | clibs_set_output (FILE *out, FILE *err) |
| Sets thread-local output streams. | |
| FILE * | clibs_get_out (void) |
| Returns the current thread-local output stream. | |
| FILE * | clibs_get_err (void) |
| Returns the current thread-local error stream. | |
Variables | |
| THREAD_LOCAL FILE * | clibs_out = NULL |
| Per-thread output stream for stdout-equivalent messages. | |
| THREAD_LOCAL FILE * | clibs_err = NULL |
| Per-thread output stream for logging (stderr by default). | |
Thread-local output stream implementation for clibs_logger.
| FILE * clibs_get_err | ( | void | ) |
Returns the current thread-local error stream.
Gets current error stream (fallback: stderr).
Falls back to stderr if no thread-local error stream is set.
| FILE * clibs_get_out | ( | void | ) |
Returns the current thread-local output stream.
Gets current output stream (fallback: stdout).
Falls back to stdout if no thread-local output stream is set.
| void clibs_set_output | ( | FILE * | out, |
| FILE * | err ) |
Sets thread-local output streams.
Sets thread-local output and error streams.
| out | Output stream for general messages (default fallback: stdout). |
| err | Output stream for log messages (default fallback: stderr). |