|
16 | 16 | #include <syslog.h>
|
17 | 17 | #endif
|
18 | 18 |
|
19 |
| -#ifdef ULOG_OUTPUT_FLOAT |
20 |
| -#include <stdio.h> |
21 |
| -#endif |
22 |
| - |
23 | 19 | #ifdef ULOG_TIME_USING_TIMESTAMP
|
24 | 20 | #include <sys/time.h>
|
25 | 21 | #endif
|
@@ -367,12 +363,7 @@ RT_WEAK rt_size_t ulog_formater(char *log_buf, rt_uint32_t level, const char *ta
|
367 | 363 | #endif /* ULOG_OUTPUT_THREAD_NAME */
|
368 | 364 |
|
369 | 365 | log_len += ulog_strcpy(log_len, log_buf + log_len, ": ");
|
370 |
| - |
371 |
| -#ifdef ULOG_OUTPUT_FLOAT |
372 |
| - fmt_result = vsnprintf(log_buf + log_len, ULOG_LINE_BUF_SIZE - log_len, format, args); |
373 |
| -#else |
374 | 366 | fmt_result = rt_vsnprintf(log_buf + log_len, ULOG_LINE_BUF_SIZE - log_len, format, args);
|
375 |
| -#endif /* ULOG_OUTPUT_FLOAT */ |
376 | 367 |
|
377 | 368 | /* calculate log length */
|
378 | 369 | if ((log_len + fmt_result <= ULOG_LINE_BUF_SIZE) && (fmt_result > -1))
|
@@ -674,15 +665,10 @@ void ulog_raw(const char *format, ...)
|
674 | 665 |
|
675 | 666 | /* lock output */
|
676 | 667 | output_lock();
|
| 668 | + |
677 | 669 | /* args point to the first variable parameter */
|
678 | 670 | va_start(args, format);
|
679 |
| - |
680 |
| -#ifdef ULOG_OUTPUT_FLOAT |
681 |
| - fmt_result = vsnprintf(log_buf, ULOG_LINE_BUF_SIZE, format, args); |
682 |
| -#else |
683 | 671 | fmt_result = rt_vsnprintf(log_buf, ULOG_LINE_BUF_SIZE, format, args);
|
684 |
| -#endif /* ULOG_OUTPUT_FLOAT */ |
685 |
| - |
686 | 672 | va_end(args);
|
687 | 673 |
|
688 | 674 | /* calculate log length */
|
|
0 commit comments