mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-29 01:48:31 +00:00
u/logging: Add u_log_set_sink implementation
This commit is contained in:
parent
6f10a20ce0
commit
77ba132452
|
@ -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; \
|
||||
|
|
Loading…
Reference in a new issue