mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-10-29 05:40:16 -04:00
Make default log handler print to stderr
On the client side we log fatal errors before we exit. If a client doesn't set a log handler, it's hard to figure out what goes wrong.
This commit is contained in:
parent
8fd2520d80
commit
a7524ed0d4
1 changed files with 4 additions and 2 deletions
|
|
@ -23,6 +23,7 @@
|
|||
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
|
|
@ -361,11 +362,12 @@ wl_map_for_each(struct wl_map *map, wl_iterator_func_t func, void *data)
|
|||
}
|
||||
|
||||
static void
|
||||
wl_log_noop_handler(const char *fmt, va_list arg)
|
||||
wl_log_stderr_handler(const char *fmt, va_list arg)
|
||||
{
|
||||
vfprintf(stderr, fmt, arg);
|
||||
}
|
||||
|
||||
wl_log_func_t wl_log_handler = wl_log_noop_handler;
|
||||
wl_log_func_t wl_log_handler = wl_log_stderr_handler;
|
||||
|
||||
void
|
||||
wl_log(const char *fmt, ...)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue