EINA_LOG_ERR("Could not create logging domain for E_Input");
goto log_err;
}
+ eina_log_domain_level_set("e_input", EINA_LOG_LEVEL_INFO);
E_INPUT_EVENT_SEAT_ADD = ecore_event_type_new();
E_EVENT_INPUT_ENABLED = ecore_event_type_new();
}
static void
-e_input_device_libinput_log_handler(struct libinput *libinput EINA_UNUSED,
+_libinput_log_handler(struct libinput *libinput EINA_UNUSED,
enum libinput_log_priority priority,
const char *format, va_list args)
{
switch (priority)
{
case LIBINPUT_LOG_PRIORITY_DEBUG:
- DBG("%s", buf);
+ EIDBG("%s", buf);
break;
case LIBINPUT_LOG_PRIORITY_INFO:
- INF("%s", buf);
+ EIINF("%s", buf);
break;
case LIBINPUT_LOG_PRIORITY_ERROR:
- ERR("%s", buf);
+ EIERR("%s", buf);
break;
default:
break;
else
{
if (input->log_use_eina)
- libinput_log_set_handler(input->libinput, e_input_device_libinput_log_handler);
+ libinput_log_set_handler(input->libinput, _libinput_log_handler);
libinput_log_set_priority(input->libinput, LIBINPUT_LOG_PRIORITY_INFO);
}
else
{
if (input->log_use_eina)
- libinput_log_set_handler(input->libinput, e_input_device_libinput_log_handler);
+ libinput_log_set_handler(input->libinput, _libinput_log_handler);
libinput_log_set_priority(input->libinput, LIBINPUT_LOG_PRIORITY_INFO);
}
else
{
if (input->log_use_eina)
- libinput_log_set_handler(input->libinput, e_input_device_libinput_log_handler);
+ libinput_log_set_handler(input->libinput, _libinput_log_handler);
libinput_log_set_priority(input->libinput, LIBINPUT_LOG_PRIORITY_INFO);
}
else
{
if (input->log_use_eina)
- libinput_log_set_handler(input->libinput, e_input_device_libinput_log_handler);
+ libinput_log_set_handler(input->libinput, _libinput_log_handler);
libinput_log_set_priority(input->libinput, LIBINPUT_LOG_PRIORITY_INFO);
}
#include <Eeze.h>
#include <glib.h>
+#ifdef DBG
+# undef DBG
+#endif
+
+#ifdef INF
+# undef INF
+#endif
+
+#ifdef ERR
+# undef ERR
+#endif
+
+extern int _e_input_log_dom;
+#define DBG(...) EINA_LOG_DOM_DBG(_e_input_log_dom, __VA_ARGS__)
+#define INF(...) EINA_LOG_DOM_INFO(_e_input_log_dom, __VA_ARGS__)
+#define ERR(...) EINA_LOG_DOM_ERR(_e_input_log_dom, __VA_ARGS__)
+
+#define EIERR(msg, ARG...) ERR("[%s:%d] "msg, __FUNCTION__, __LINE__, ##ARG)
+#define EIINF(msg, ARG...) INF("[%s:%d] "msg, __FUNCTION__, __LINE__, ##ARG)
+#define EIDBG(msg, ARG...) DBG("[%s:%d] "msg, __FUNCTION__, __LINE__, ##ARG)
+
extern struct xkb_keymap *cached_keymap;
extern struct xkb_context *cached_context;