diff options
author | Minje Ahn <minje.ahn@samsung.com> | 2015-06-08 16:33:26 +0900 |
---|---|---|
committer | Minje Ahn <minje.ahn@samsung.com> | 2015-06-08 16:33:26 +0900 |
commit | b17f8d10bf16779c62c4e2b267d2bdc716ccfdac (patch) | |
tree | f4572cb3d19abe5c93bb331ae639eb54d5a123dc /src/include | |
parent | 9c534f334a71a5250c9411cc53c83cd72e3b7e74 (diff) | |
download | libmedia-thumbnail-b17f8d10bf16779c62c4e2b267d2bdc716ccfdac.tar.gz libmedia-thumbnail-b17f8d10bf16779c62c4e2b267d2bdc716ccfdac.tar.bz2 libmedia-thumbnail-b17f8d10bf16779c62c4e2b267d2bdc716ccfdac.zip |
Update error log.
Change-Id: I632eda45a7b46927b5c5be9e98cebd30aefc69d4
Signed-off-by: Minje Ahn <minje.ahn@samsung.com>
Diffstat (limited to 'src/include')
-rwxr-xr-x | src/include/util/media-thumb-debug.h | 30 |
1 files changed, 27 insertions, 3 deletions
diff --git a/src/include/util/media-thumb-debug.h b/src/include/util/media-thumb-debug.h index 2bc7380..3c0c21b 100755 --- a/src/include/util/media-thumb-debug.h +++ b/src/include/util/media-thumb-debug.h @@ -54,9 +54,33 @@ static pid_t gettid(void) #define FONT_COLOR_CYAN "\033[36m" #define FONT_COLOR_GRAY "\033[37m" -#define thumb_dbg(fmt, arg...) LOGD(FONT_COLOR_RESET"[%d] " fmt "\n", gettid(), ##arg) -#define thumb_warn(fmt, arg...) LOGW(FONT_COLOR_GREEN"[%d] " fmt "\n", gettid(), ##arg) -#define thumb_err(fmt, arg...) LOGE(FONT_COLOR_RED"[%d] " fmt "\n", gettid(), ##arg) +#define thumb_dbg(fmt, arg...) do{ \ + LOGD(FONT_COLOR_RESET"[%d] " fmt "\n", gettid(), ##arg); \ + } while(0) + +#define thumb_warn(fmt, arg...) do{ \ + LOGW(FONT_COLOR_GREEN"[%d] " fmt "\n", gettid(), ##arg); \ + } while(0) + +#define thumb_err(fmt, arg...) do{ \ + LOGE(FONT_COLOR_RED"[%d] " fmt "\n", gettid(), ##arg); \ + } while(0) + +#define thumb_dbg_slog(fmt, arg...) do{ \ + SECURE_LOGD(FONT_COLOR_RESET"[%d] " fmt "\n", gettid(), ##arg); \ + } while(0) + +#define thumb_warn_slog(fmt, arg...) do{ \ + SECURE_LOGW(FONT_COLOR_GREEN"[%d] " fmt "\n", gettid(), ##arg); \ + } while(0) + + +#define ERR_BUF_LENGHT 256 +#define thumb_stderror(fmt) do { \ + char buf[ERR_BUF_LENGHT] = {0,}; \ + strerror_r(errno, buf, ERR_BUF_LENGHT); \ + LOGE(FONT_COLOR_RED fmt" : standard error [%s]", buf); \ + } while (0) #ifdef _USE_LOG_FILE_ void thumb_init_file_debug(); |