u/logging: Add u_log_set_sink implementation

This commit is contained in:
Jakob Bornecrantz 2022-03-17 15:37:09 +00:00
parent 6f10a20ce0
commit 77ba132452

View file

@ -29,6 +29,13 @@ u_log_get_global_level(void)
static u_log_sink_function_t g_log_sink_func;
static void *g_log_sink_data;
void
u_log_set_sink(u_log_sink_function_t func, void *data)
{
g_log_sink_func = func;
g_log_sink_data = data;
}
#define DISPATCH_SINK(FILE, LINE, FUNC, LEVEL, FORMAT, ARGS) \
if (g_log_sink_func != NULL) { \
va_list copy; \