diff options
| author | Kristian Høgsberg <krh@bitplanet.net> | 2014-02-07 15:57:07 -0800 |
|---|---|---|
| committer | Kristian Høgsberg <krh@bitplanet.net> | 2014-02-07 15:57:07 -0800 |
| commit | a7524ed0d4cc4fcf8a0c5201618a4dfcd20f9499 (patch) | |
| tree | 48c92a4ab08940726c56afdfb9299ec2fcb7798c /src | |
| parent | Rename wl_debug to debug_server/client (diff) | |
| download | wayland-a7524ed0d4cc4fcf8a0c5201618a4dfcd20f9499.tar wayland-a7524ed0d4cc4fcf8a0c5201618a4dfcd20f9499.tar.gz wayland-a7524ed0d4cc4fcf8a0c5201618a4dfcd20f9499.tar.bz2 wayland-a7524ed0d4cc4fcf8a0c5201618a4dfcd20f9499.tar.lz wayland-a7524ed0d4cc4fcf8a0c5201618a4dfcd20f9499.tar.xz wayland-a7524ed0d4cc4fcf8a0c5201618a4dfcd20f9499.tar.zst wayland-a7524ed0d4cc4fcf8a0c5201618a4dfcd20f9499.zip | |
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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/wayland-util.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/wayland-util.c b/src/wayland-util.c index 4fe9c81..b099882 100644 --- a/src/wayland-util.c +++ b/src/wayland-util.c @@ -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, ...) |
