Add API to install protocol loggers on the server wl_display
authorGiulio Camuffo <giuliocamuffo@gmail.com>
Fri, 12 Aug 2016 07:33:06 +0000 (09:33 +0200)
committerPekka Paalanen <pekka.paalanen@collabora.co.uk>
Fri, 12 Aug 2016 08:59:46 +0000 (11:59 +0300)
commit450f06e21a3dc772b96de12d81ea27d665f8b33c
treec947525e40be4626a86d9dd61f30423e6157db6b
parent2f617250d27ec3258071077997934c43948c384b
Add API to install protocol loggers on the server wl_display

The new wl_display_add_protocol_logger allows to set a function as
a logger, which will get called when a new request is received or an
event is sent.
This is akin to setting WAYLAND_DEBUG=1, but more powerful because it
can be enabled at run time and allows to show the log e.g. in a UI view.
A test is added for the new functionality.

Signed-off-by: Giulio Camuffo <giulio.camuffo@kdab.com>
Reviewed-by: Jonas Ã…dahl <jadahl@gmail.com>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Makefile.am
src/wayland-server-core.h
src/wayland-server.c
tests/protocol-logger-test.c [new file with mode: 0644]