1. Change tag style for error log
[platform/core/location/lbs-location.git] / location / include / location-log.h
index bffe368..8752d1d 100644 (file)
 #define LOCATION_LOGE(fmt, args...)            LOGE(fmt, ##args)
 #define LOCATION_SECLOG(fmt, args...)  SECURE_LOGD(fmt, ##args)
 
+#define _D(fmt, args...)               LOGD(fmt, ##args)
+#define _W(fmt, args...)               LOGW(fmt, ##args)
+#define _I(fmt, args...)               LOGI(fmt, ##args)
+#define _E(fmt, args...)               LOGE(fmt, ##args)
+
+#define LOC_IF_FAIL(ret, tag, fmt, arg...) \
+       do { if (ret != 0) { tag(fmt, ##arg); return ret; } } while (0)
+
+#define LOC_IF_FAIL_LOG(ret, tag, fmt, arg...) \
+       do { if (ret != 0) tag(fmt, ##arg); } while (0)
+
+#define LOC_COND_RET(cond, ret, tag, fmt, arg...) \
+       do { if (cond) { tag(fmt, ##arg); return ret; } } while (0)
+
+#define LOC_COND_VOID(cond, tag, fmt, arg...) \
+       do { if (cond) { tag(fmt, ##arg); return ; } } while (0)
+
+#define LOC_COND_LOG(cond, tag, fmt, arg...) \
+       do { if (cond) tag(fmt, ##arg); } while (0)
+
+#define LOC_FUNC_LOG           LOGI("%s", __func__);
 
 #endif