Change all the SmartThings APIs for Tizen 5.0
[apps/native/st-things-blind.git] / inc / log.h
index d958e2e..bb327cb 100644 (file)
--- a/inc/log.h
+++ b/inc/log.h
  * limitations under the License.
  */
 
-#ifndef __POSITION_FINDER_SERVER_H__
-#define __POSITION_FINDER_SERVER_H__
 
-#include <dlog.h>
+#ifndef __LOG_H__
+#define  __LOG_H__
 
-#ifdef  LOG_TAG
-#undef  LOG_TAG
-#endif
-#define LOG_TAG "TT"
-
-#if !defined(_D)
-#define _D(fmt, arg...) dlog_print(DLOG_DEBUG, LOG_TAG, "[%s:%d] " fmt "\n", __func__, __LINE__, ##arg)
-#endif
+#include <dlog.h>
 
-#if !defined(DBG)
-#define DBG(fmt, arg...) dlog_print(DLOG_DEBUG, LOG_TAG, "[%s:%d] " fmt "\n", __func__, __LINE__, ##arg)
+#ifdef __cplusplus
+extern "C" {
 #endif
 
-#if !defined(_I)
-#define _I(fmt, arg...) dlog_print(DLOG_INFO, LOG_TAG, "[%s:%d] " fmt "\n", __func__, __LINE__, ##arg)
+#ifdef  LOG_TAG
+#undef  LOG_TAG
 #endif
+#define LOG_TAG "STAPP"
 
-#if !defined(_W)
-#define _W(fmt, arg...) dlog_print(DLOG_WARN, LOG_TAG, "[%s:%d] " fmt "\n", __func__, __LINE__, ##arg)
-#endif
+#define _E(fmt, args...) dlog_print(DLOG_ERROR, LOG_TAG, "%s : %s(%d) > "fmt"\n", rindex(__FILE__, '/') + 1, __func__, __LINE__, ##args)
+#define _W(fmt, args...) dlog_print(DLOG_WARN, LOG_TAG, "%s : %s(%d) > "fmt"\n", rindex(__FILE__, '/') + 1, __func__, __LINE__, ##args)
+#define _I(fmt, args...)  dlog_print(DLOG_INFO, LOG_TAG, "%s : %s(%d) > "fmt"\n", rindex(__FILE__, '/') + 1, __func__, __LINE__, ##args)
+#define _D(fmt, args...) dlog_print(DLOG_DEBUG, LOG_TAG, "%s : %s(%d) > "fmt"\n", rindex(__FILE__, '/') + 1, __func__, __LINE__, ##args)
 
-#if !defined(_E)
-#define _E(fmt, arg...) dlog_print(DLOG_ERROR, LOG_TAG, "[%s:%d] " fmt "\n", __func__, __LINE__, ##arg)
-#endif
+#define START dlog_print(DLOG_DEBUG, LOG_TAG, "%s : %s(%d) >>>>>>>> called", rindex(__FILE__, '/') + 1, __func__, __LINE__)
+#define END dlog_print(DLOG_DEBUG, LOG_TAG, "%s : %s(%d) <<<<<<<< ended", rindex(__FILE__, '/') + 1, __func__, __LINE__)
 
 #define retvm_if(expr, val, fmt, arg...) do { \
        if (expr) { \
@@ -97,6 +90,9 @@
        } \
 }
 
+#ifdef __cplusplus
+}
+#endif
 
 
-#endif /* __POSITION_FINDER_SERVER_H__ */
+#endif /* __LOG_H__ */