From d0beb4f9d847fc138146fbc0a82540aed3266697 Mon Sep 17 00:00:00 2001 From: Cho Woong Suk Date: Wed, 13 Dec 2017 16:30:12 +0900 Subject: [PATCH] remove module/function name from stderr log Change-Id: I48980d8579ed68a54460a795b550e853a80e67c5 --- NativeLauncher/inc/log.h | 10 ++++++++++ NativeLauncher/util/utils.cc | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/NativeLauncher/inc/log.h b/NativeLauncher/inc/log.h index 5769204..3315f8e 100644 --- a/NativeLauncher/inc/log.h +++ b/NativeLauncher/inc/log.h @@ -19,11 +19,17 @@ #ifndef NO_TIZEN #include +#define LOGX(fmt, arg...) \ + ({ do { \ + dlog_print(DLOG_ERROR, LOG_TAG, fmt, ##arg); \ + } while (0); }) + #else #include #define LOGE(fmt, args...) printf(fmt, ##args) #define LOGD(fmt, args...) printf(fmt, ##args) #define LOGI(fmt, args...) printf(fmt, ##args) +#define LOGX(fmt, args...) printf(fmt, ##args) #endif #ifdef LOG_TAG @@ -43,4 +49,8 @@ #define _INFO(fmt, args...) LOGI(fmt "\n", ##args) #endif +#ifndef _ERRX +#define _ERRX(fmt, args...) LOGX(fmt "\n", ##args) +#endif + #endif /* __LOG_H__ */ diff --git a/NativeLauncher/util/utils.cc b/NativeLauncher/util/utils.cc index d4142eb..f5b9406 100644 --- a/NativeLauncher/util/utils.cc +++ b/NativeLauncher/util/utils.cc @@ -311,7 +311,7 @@ static void *stdlog(void*) buf[readSize] = 0; - _INFO("%s", buf); + _ERRX("%s", buf); } return 0; -- 2.7.4