summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPekka Paalanen <ppaalanen@gmail.com>2012-12-12 14:26:40 +0200
committerKristian Høgsberg <krh@bitplanet.net>2012-12-12 11:06:23 -0500
commit874982ab012611323fa3cc5ad6008d743e778540 (patch)
tree25d7a1ac860b1d89b4fefd5aacc69f1c53a5451a
parent88838185917f29aba2273b5081ddd4e8803103b1 (diff)
downloadweston-874982ab012611323fa3cc5ad6008d743e778540.tar.gz
tests: set client log handler
Otherwise we cannot normally see protocol errors etc. in the test output. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
-rw-r--r--tests/weston-test-client-helper.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/weston-test-client-helper.c b/tests/weston-test-client-helper.c
index c7ab4e55..1a1b4f13 100644
--- a/tests/weston-test-client-helper.c
+++ b/tests/weston-test-client-helper.c
@@ -442,12 +442,21 @@ static const struct wl_registry_listener registry_listener = {
handle_global
};
+static void
+log_handler(const char *fmt, va_list args)
+{
+ fprintf(stderr, "libwayland: ");
+ vfprintf(stderr, fmt, args);
+}
+
struct client *
client_create(int x, int y, int width, int height)
{
struct client *client;
struct surface *surface;
+ wl_log_set_handler_client(log_handler);
+
/* connect to display */
client = calloc(1, sizeof *client);
client->wl_display = wl_display_connect(NULL);