From e3935ad1431623b5e3966e95cd75b45e7e00e278 Mon Sep 17 00:00:00 2001 From: Brian Ashworth Date: Mon, 14 Jan 2019 23:30:54 -0500 Subject: Implement logging and remove wlroots dependency This implements a simpler version of the wlroots logger for swaylock. With this logger, the dependency on wlroots can be dropped. This also adds a debug flag and disables debugging output by default --- seat.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'seat.c') diff --git a/seat.c b/seat.c index 2eb02fc..283fe3c 100644 --- a/seat.c +++ b/seat.c @@ -2,8 +2,8 @@ #include #include #include -#include #include +#include "log.h" #include "swaylock.h" #include "seat.h" @@ -12,13 +12,13 @@ static void keyboard_keymap(void *data, struct wl_keyboard *wl_keyboard, struct swaylock_state *state = data; if (format != WL_KEYBOARD_KEYMAP_FORMAT_XKB_V1) { close(fd); - wlr_log(WLR_ERROR, "Unknown keymap format %d, aborting", format); + swaylock_log(LOG_ERROR, "Unknown keymap format %d, aborting", format); exit(1); } char *map_shm = mmap(NULL, size, PROT_READ, MAP_SHARED, fd, 0); if (map_shm == MAP_FAILED) { close(fd); - wlr_log(WLR_ERROR, "Unable to initialize keymap shm, aborting"); + swaylock_log(LOG_ERROR, "Unable to initialize keymap shm, aborting"); exit(1); } struct xkb_keymap *keymap = xkb_keymap_new_from_string( -- cgit v1.2.3