Package version up to 3.1.11
[platform/core/uifw/libtdm.git] / include / tdm_log.h
index f1b3cdc..67ea4df 100644 (file)
@@ -71,7 +71,6 @@ void tdm_log_set_assert_level(int level);
 void tdm_log_set_path(const char *path);
 void tdm_log_printf(int level, const char *fmt, ...);
 void tdm_log_print(int level, const char *fmt, ...);
-
 void tdm_log_reset(void);
 
 extern unsigned int tdm_log_debug_level;
@@ -117,6 +116,17 @@ extern unsigned int tdm_log_debug_level;
                } \
        } while (0)
 
+#define TDM_INIT_INFO(fmt, args...) \
+       do { \
+               if (tdm_log_debug_level >= TDM_LOG_LEVEL_INFO) { \
+                       struct timespec ts; \
+                       clock_gettime(CLOCK_MONOTONIC, &ts); \
+                       tdm_log_print(TDM_LOG_LEVEL_INFO, "[%5d.%06d][%d][%s %d]"fmt, \
+                                                 (int)ts.tv_sec, (int)ts.tv_nsec / 1000, \
+                                                 (int)syscall(SYS_gettid), __FUNCTION__, __LINE__, ##args);  \
+               } \
+       } while (0)
+
 #define TDM_NEVER_GET_HERE() TDM_WRN("** NEVER GET HERE **")
 #define TDM_DEPRECATED(str) \
        do { \