X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=include%2Ftdm_log.h;h=67ea4dfafb35081aef93eaed75be1be3eb306cf3;hb=refs%2Fheads%2Faccepted%2Ftizen_unified_dev;hp=f1b3cdc0dfd2f338b673c882ed4bfe83fd68a1a7;hpb=2adc0c96b4af5f88b3560e8ebd0b595a3f483578;p=platform%2Fcore%2Fuifw%2Flibtdm.git diff --git a/include/tdm_log.h b/include/tdm_log.h index f1b3cdc..67ea4df 100644 --- a/include/tdm_log.h +++ b/include/tdm_log.h @@ -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 { \