log: expose wl_debug_handler for custom print debug message

issue: https://gitlab.freedesktop.org/wayland/wayland/-/issues/534
Signed-off-by: guoyao <guoyao@uniontech.com>
This commit is contained in:
guoyao 2025-04-01 15:20:05 +08:00 committed by groveer
parent 9b169ff945
commit 1423fbffda
8 changed files with 33 additions and 1 deletions

View file

@ -452,8 +452,19 @@ wl_log_stderr_handler(const char *fmt, va_list arg)
vfprintf(stderr, fmt, arg);
}
wl_debug_func_t wl_debug_handler = wl_log_stderr_handler;
wl_log_func_t wl_log_handler = wl_log_stderr_handler;
void
wl_debug(const char *fmt, ...)
{
va_list argp;
va_start(argp, fmt);
wl_debug_handler(fmt, argp);
va_end(argp);
}
void
wl_log(const char *fmt, ...)
{