sensor: capi: change log macro to show logs efficiently 86/205086/1
authorkibak.yoon <kibak.yoon@samsung.com>
Mon, 22 Apr 2019 03:35:17 +0000 (12:35 +0900)
committerrandeep singh <randeep.s@samsung.com>
Mon, 29 Apr 2019 04:50:11 +0000 (04:50 +0000)
Change-Id: Ie96faf6cc472bf2486f39ca0e14a84c13c1c334c
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
(cherry picked from commit 0d60ab51f50e1886af89e794bfffd3d7ab325202)

include/sensor_log.h

index 9c9e3ac..e70b435 100644 (file)
@@ -24,8 +24,6 @@ extern "C"
 
 #include <dlog.h>
 
-#define _DEBUG 1
-
 #undef LOG_TAG
 #define LOG_TAG        "TIZEN_SYSTEM_SENSOR"
 
@@ -38,17 +36,10 @@ extern "C"
 
 #define _E_MSG(err) SLOGE(_MSG_##err "(0x%08x)", (err))
 
-#ifdef _DEBUG
-       #define _E(fmt, args...) dlog_print(DLOG_ERROR, LOG_TAG, fmt, ##args)
-       #define _W(fmt, args...) dlog_print(DLOG_WARN, LOG_TAG, fmt, ##args)
-       #define _I(fmt, args...) dlog_print(DLOG_INFO, LOG_TAG, fmt, ##args)
-       #define _D(fmt, args...) dlog_print(DLOG_DEBUG, LOG_TAG, fmt, ##args)
-#else
-       #define _E(...)
-       #define _W(...)
-       #define _I(...)
-       #define _D(...)
-#endif
+#define _E(fmt, args...) LOGE(fmt, ##args)
+#define _W(fmt, args...) LOGW(fmt, ##args)
+#define _I(fmt, args...) LOGI(fmt, ##args)
+#define _D(fmt, args...) LOGD(fmt, ##args)
 
 #ifdef __cplusplus
 }