From 845fef7282f5729b8d773081f9ee27b8e55aa434 Mon Sep 17 00:00:00 2001 From: "bhutani.92" Date: Mon, 2 May 2016 17:45:53 +0530 Subject: [PATCH] Test ABS Settings Change-Id: Ice87965fc8c728b0989abe44a8a1e79a8af7252b Signed-off-by: bhutani.92 --- WORKSPACE | 1 + inc/util/gl-debug.h | 44 +++++++++++++++++++++++++++++++++----------- widget/inc/gl_widget_debug.h | 25 ++++++++++++++++++++++--- widget/project_def.prop | 2 +- widget/src/gl_widget_main.c | 2 +- 5 files changed, 58 insertions(+), 16 deletions(-) diff --git a/WORKSPACE b/WORKSPACE index f603992..b3a166b 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -1 +1,2 @@ widget +./ diff --git a/inc/util/gl-debug.h b/inc/util/gl-debug.h index 5c3ccd4..fba2c73 100755 --- a/inc/util/gl-debug.h +++ b/inc/util/gl-debug.h @@ -46,15 +46,37 @@ extern "C" #ifdef _USE_DLOG_ -#define gl_dbg(fmt, arg...) LOGD(FONT_COLOR_BLUE fmt FONT_COLOR_RESET, ##arg) -#define gl_dbgI(fmt, arg...) LOGI(FONT_COLOR_GREEN fmt FONT_COLOR_RESET, ##arg) -#define gl_dbgW(fmt, arg...) LOGW(FONT_COLOR_CYAN fmt FONT_COLOR_RESET, ##arg) -#define gl_dbgE(fmt, arg...) LOGE(FONT_COLOR_RED fmt FONT_COLOR_RESET, ##arg) +#ifndef LOG_DEBUG +#define LOG_DEBUG LOG_TAG +#endif +#ifndef LOGD +#define LOGD(fmt, arg...) dlog_print(DLOG_DEBUG, LOG_TAG, ##arg) +#endif +#ifndef LOGW +#define LOGW(fmt, arg...) dlog_print(DLOG_INFO, LOG_TAG, ##arg) +#endif +#ifndef LOGE +#define LOGE(fmt, arg...) dlog_print(DLOG_ERROR, LOG_TAG, ##arg) +#endif +#ifndef SECURE_LOGD +#define SECURE_LOGD(fmt, arg...) dlog_print(DLOG_DEBUG, LOG_TAG, ##arg) +#endif +#ifndef SECURE_LOGI +#define SECURE_LOGI(fmt, arg...) dlog_print(DLOG_DEBUG, LOG_TAG, ##arg) +#endif +#ifndef SECURE_LOGE +#define SECURE_LOGE(fmt, arg...) dlog_print(DLOG_DEBUG, LOG_TAG, ##arg) +#endif + +#define gl_dbg(fmt, arg...) LOGD(true, FONT_COLOR_BLUE fmt FONT_COLOR_RESET, ##arg) +#define gl_dbgI(fmt, arg...) LOGI(true, FONT_COLOR_GREEN fmt FONT_COLOR_RESET, ##arg) +#define gl_dbgW(fmt, arg...) LOGW(true, FONT_COLOR_CYAN fmt FONT_COLOR_RESET, ##arg) +#define gl_dbgE(fmt, arg...) LOGE(true, FONT_COLOR_RED fmt FONT_COLOR_RESET, ##arg) -#define GL_PROFILE_IN LOG(LOG_DEBUG, "LAUNCH", "[gallery:Application:%s:IN]", __FUNCTION__) -#define GL_PROFILE_OUT LOG(LOG_DEBUG, "LAUNCH", "[gallery:Application:%s:OUT]", __FUNCTION__) -#define GL_PROFILE_F_IN(func) LOG(LOG_DEBUG, "LAUNCH","[gallery:Application:"func":IN]") -#define GL_PROFILE_F_OUT(func) LOG(LOG_DEBUG, "LAUNCH","[gallery:Application:"func":OUT]") +#define GL_PROFILE_IN gl_dbg("%s LAUNCH [gallery:Application:%s:IN] %s", LOG_DEBUG, __FUNCTION__) +#define GL_PROFILE_OUT gl_dbg("%s LAUNCH [gallery:Application:%s:OUT] %s", LOG_DEBUG, __FUNCTION__) +#define GL_PROFILE_F_IN(func) gl_dbg(LOG_DEBUG, "LAUNCH","[gallery:Application:"func":IN]") +#define GL_PROFILE_F_OUT(func) gl_dbg(LOG_DEBUG, "LAUNCH","[gallery:Application:"func":OUT]") #else @@ -70,9 +92,9 @@ extern "C" #endif #ifdef _USE_SECURE_LOG_ -#define gl_sdbg(fmt, arg...) SECURE_LOGD(FONT_COLOR_BLUE fmt FONT_COLOR_RESET, ##arg) -#define gl_sdbgW(fmt, arg...) SECURE_LOGI(FONT_COLOR_GREEN fmt FONT_COLOR_RESET, ##arg) -#define gl_sdbgE(fmt, arg...) SECURE_LOGE(FONT_COLOR_RED fmt FONT_COLOR_RESET, ##arg) +#define gl_sdbg(fmt, arg...) SECURE_LOGD(true, FONT_COLOR_BLUE fmt FONT_COLOR_RESET, ##arg) +#define gl_sdbgW(fmt, arg...) SECURE_LOGI(true, FONT_COLOR_GREEN fmt FONT_COLOR_RESET, ##arg) +#define gl_sdbgE(fmt, arg...) SECURE_LOGE(true, FONT_COLOR_RED fmt FONT_COLOR_RESET, ##arg) #endif diff --git a/widget/inc/gl_widget_debug.h b/widget/inc/gl_widget_debug.h index 3b15c9c..6548c24 100644 --- a/widget/inc/gl_widget_debug.h +++ b/widget/inc/gl_widget_debug.h @@ -18,10 +18,29 @@ #ifndef GL_WIDGET_DEBUG_H #define GL_WIDGET_DEBUG_H +#ifndef LOGD +#define LOGD(fmt, arg...) dlog_print(DLOG_DEBUG, LOG_TAG, ##arg) +#endif +#ifndef LOGW +#define LOGW(fmt, arg...) dlog_print(DLOG_INFO, LOG_TAG, ##arg) +#endif +#ifndef LOGE +#define LOGE(fmt, arg...) dlog_print(DLOG_ERROR, LOG_TAG, ##arg) +#endif +#ifndef SECURE_LOGD +#define SECURE_LOGD(fmt, arg...) dlog_print(DLOG_DEBUG, LOG_TAG, ##arg) +#endif +#ifndef SECURE_LOGI +#define SECURE_LOGI(fmt, arg...) dlog_print(DLOG_DEBUG, LOG_TAG, ##arg) +#endif +#ifndef SECURE_LOGE +#define SECURE_LOGE(fmt, arg...) dlog_print(DLOG_DEBUG, LOG_TAG, ##arg) +#endif + #if !defined(FLOG) -#define DbgPrint(format, arg...) LOGD(format, ##arg) -#define ErrPrint(format, arg...) LOGE(format, ##arg) -#define WarnPrint(format, arg...) LOGW(format, ##arg) +#define DbgPrint(format, arg...) LOGD(true, format, ##arg) +#define ErrPrint(format, arg...) LOGE(true, format, ##arg) +#define WarnPrint(format, arg...) LOGW(true, format, ##arg) #else extern FILE *__file_log_fp; #define DbgPrint(format, arg...) do { fprintf(__file_log_fp, "[LOG] [%s/%s:%d] " format, util_basename(__FILE__), __func__, __LINE__, ##arg); fflush(__file_log_fp); } while (0) diff --git a/widget/project_def.prop b/widget/project_def.prop index a58c92f..0f30855 100644 --- a/widget/project_def.prop +++ b/widget/project_def.prop @@ -36,7 +36,7 @@ USER_OBJS_ABS = # User Includes ## C Compiler USER_INC_DIRS = inc -USER_INC_DIRS_ABS = $(workspace_loc)/Gallery/gallery/inc/data $(workspace_loc)/Gallery/gallery/inc/features $(workspace_loc)/Gallery/gallery/inc/util $(workspace_loc)/Gallery/gallery/inc/widget +USER_INC_DIRS_ABS = $(workspace_loc)/inc/data $(workspace_loc)/inc/features $(workspace_loc)/inc/util $(workspace_loc)/inc/widget USER_INC_FILES = USER_INC_FILES_ABS = ## C++ Compiler diff --git a/widget/src/gl_widget_main.c b/widget/src/gl_widget_main.c index 4517a26..eaf307c 100644 --- a/widget/src/gl_widget_main.c +++ b/widget/src/gl_widget_main.c @@ -27,8 +27,8 @@ #include -#include "gl_widget.h" #include "gl_widget_debug.h" +#include "gl_widget.h" void *getWidgetData(widget_context_h context) { -- 2.7.4