pepper: Add PEPPER_TRACE macro for debugging purpose
authorTaekyun Kim <tkq.kim@samsung.com>
Thu, 13 Aug 2015 05:04:19 +0000 (14:04 +0900)
committerTaekyun Kim <tkq.kim@samsung.com>
Thu, 13 Aug 2015 05:04:19 +0000 (14:04 +0900)
Change-Id: Ie43a4a777c060116732b8958b6677a82cb6b5b96

src/lib/pepper/input.c
src/lib/pepper/pepper-utils.h
src/lib/x11/x11-internal.h

index 319b29f..b3c8d46 100644 (file)
@@ -1,8 +1,5 @@
 #include "pepper-internal.h"
 
-#undef PEPPER_TRACE
-#define PEPPER_TRACE(...)
-
 typedef struct pepper_input_device_entry pepper_input_device_entry_t;
 
 struct pepper_input_device_entry
index ff96fd6..d3a5e32 100644 (file)
@@ -305,6 +305,11 @@ pepper_log(const char* domain, int level, const char *format, ...);
         pepper_log("ERROR", 0, "%s:%s: "fmt, __FILE__, __FUNCTION__, ##__VA_ARGS__);   \
     } while (0)
 
+#define PEPPER_TRACE(fmt, ...)                                                          \
+    do {                                                                                \
+        pepper_log("DEBUG", 0, fmt, ##__VA_ARGS__);                                     \
+    } while (0)
+
 PEPPER_API void
 pepper_assert(pepper_bool_t exp);
 
index 47f48dc..9a45172 100644 (file)
@@ -16,8 +16,6 @@
 
 #define X11_BACKEND_INPUT_ID    0x12345678
 
-#define PEPPER_TRACE(x)
-
 typedef struct x11_output       x11_output_t;
 typedef struct x11_cursor       x11_cursor_t;
 typedef struct x11_seat         x11_seat_t;