log: add return char only in case of stdout 02/171002/2
authorBoram Park <boram1288.park@samsung.com>
Sun, 25 Feb 2018 22:53:47 +0000 (07:53 +0900)
committerBoram Park <boram1288.park@samsung.com>
Sun, 25 Feb 2018 23:27:57 +0000 (08:27 +0900)
Change-Id: Ia87ae3a1fdceec67d93280f3e238092f544bc851

common/tdm_log.c
include/tdm_log.h

index aa687036e6257e258d6f4b039fdebb586516ece8..6e4c517adf5976f59179e294007e7df14ec97ac0 100644 (file)
@@ -192,7 +192,7 @@ tdm_log_print(int level, const char *fmt, ...)
                va_start(arg, fmt);
                vprintf(fmt, arg);
                va_end(arg);
-
+               printf("\n");
                pthread_mutex_unlock(&log_lock);
        }
 
index 880ffe8e342febeca13dd858e8cdcb43d7669709..b653aa2228c12437021abe19ebefb85b6ce907ac 100644 (file)
@@ -80,7 +80,7 @@ extern unsigned int tdm_log_debug_level;
                if (tdm_log_debug_level >= TDM_LOG_LEVEL_DBG) { \
                        struct timespec ts; \
                        clock_gettime(CLOCK_MONOTONIC, &ts); \
-                       tdm_log_print(TDM_LOG_LEVEL_DBG, "[%5d.%06d][%d][%s %d]"fmt"\n", \
+                       tdm_log_print(TDM_LOG_LEVEL_DBG, "[%5d.%06d][%d][%s %d]"fmt, \
                                                  (int)ts.tv_sec, (int)ts.tv_nsec / 1000, \
                                                  (int)syscall(SYS_gettid), __FUNCTION__, __LINE__, ##args);  \
                } \
@@ -90,7 +90,7 @@ extern unsigned int tdm_log_debug_level;
                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"\n", \
+                       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);  \
                } \
@@ -100,7 +100,7 @@ extern unsigned int tdm_log_debug_level;
                if (tdm_log_debug_level >= TDM_LOG_LEVEL_WRN) { \
                        struct timespec ts; \
                        clock_gettime(CLOCK_MONOTONIC, &ts); \
-                       tdm_log_print(TDM_LOG_LEVEL_WRN, "[%5d.%06d][%d][%s %d]"fmt"\n", \
+                       tdm_log_print(TDM_LOG_LEVEL_WRN, "[%5d.%06d][%d][%s %d]"fmt, \
                                                  (int)ts.tv_sec, (int)ts.tv_nsec / 1000, \
                                                  (int)syscall(SYS_gettid), __FUNCTION__, __LINE__, ##args);  \
                } \
@@ -110,7 +110,7 @@ extern unsigned int tdm_log_debug_level;
                if (tdm_log_debug_level >= TDM_LOG_LEVEL_ERR) { \
                        struct timespec ts; \
                        clock_gettime(CLOCK_MONOTONIC, &ts); \
-                       tdm_log_print(TDM_LOG_LEVEL_ERR, "[%5d.%06d][%d][%s %d]"fmt"\n", \
+                       tdm_log_print(TDM_LOG_LEVEL_ERR, "[%5d.%06d][%d][%s %d]"fmt, \
                                                  (int)ts.tv_sec, (int)ts.tv_nsec / 1000, \
                                                  (int)syscall(SYS_gettid), __FUNCTION__, __LINE__, ##args);  \
                } \