remove module/function name from stderr log 40/163740/2
authorCho Woong Suk <ws77.cho@samsung.com>
Wed, 13 Dec 2017 07:30:12 +0000 (16:30 +0900)
committerJongHeon Choi <j-h.choi@samsung.com>
Mon, 1 Jan 2018 23:56:54 +0000 (23:56 +0000)
Change-Id: I48980d8579ed68a54460a795b550e853a80e67c5

NativeLauncher/inc/log.h
NativeLauncher/util/utils.cc

index 5769204..3315f8e 100644 (file)
 
 #ifndef NO_TIZEN
 #include <dlog.h>
+#define LOGX(fmt, arg...) \
+       ({ do { \
+               dlog_print(DLOG_ERROR, LOG_TAG, fmt, ##arg); \
+       } while (0); })
+
 #else
 #include <stdio.h>
 #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__ */
index d4142eb..f5b9406 100644 (file)
@@ -311,7 +311,7 @@ static void *stdlog(void*)
 
         buf[readSize] = 0;
 
-        _INFO("%s", buf);
+        _ERRX("%s", buf);
     }
 
     return 0;