pkarashchenko commented on code in PR #9780:
URL: https://github.com/apache/nuttx/pull/9780#discussion_r1260858800


##########
drivers/syslog/vsyslog.c:
##########
@@ -148,107 +145,115 @@ int nx_vsyslog(int priority, FAR const IPTR char *fmt, 
FAR va_list *ap)
 #  endif
 #endif
 
-  ret = lib_sprintf(&stream.public,
+#if defined(CONFIG_SYSLOG_COLOR_OUTPUT) || defined(CONFIG_SYSLOG_TIMESTAMP) || 
\
+    defined(CONFIG_SMP) || defined(CONFIG_SYSLOG_PROCESSID) || \
+    defined(CONFIG_SYSLOG_PRIORITY) || defined(CONFIG_SYSLOG_PREFIX) || \
+    defined(CONFIG_SYSLOG_PROCESS_NAME)
+
+  ret = lib_sprintf_internal(&stream.public,
 #if defined(CONFIG_SYSLOG_COLOR_OUTPUT)
   /* Reset the terminal style. */
 
-                    "\e[0m"
+                             "\e[0m"
 #endif
 
 #ifdef CONFIG_SYSLOG_TIMESTAMP
 #  if defined(CONFIG_SYSLOG_TIMESTAMP_FORMATTED)
 #    if defined(CONFIG_SYSLOG_TIMESTAMP_FORMAT_MICROSECOND)
-                    "[%s.%06ld] "
+                             "[%s.%06ld] "
 #    else
-                    "[%s] "
+                             "[%s] "
 #    endif
 #  else
-                    "[%5jd.%06ld] "
+                             "[%5jd.%06ld] "
 #  endif
 #endif
 
 #if defined(CONFIG_SMP)
-                    "[CPU%d] "
+                             "[CPU%d] "
 #endif
 
 #if defined(CONFIG_SYSLOG_PROCESSID)
   /* Prepend the Thread ID */
 
-                    "[%2d] "
+                             "[%2d] "
 #endif
 
 #if defined(CONFIG_SYSLOG_COLOR_OUTPUT)
   /* Set the terminal style according to message priority. */
 
-                    "%s"
+                             "%s"
 #endif
 
 #if defined(CONFIG_SYSLOG_PRIORITY)
   /* Prepend the message priority. */
 
-                    "[%6s] "
+                             "[%6s] "
 #endif
 
 #if defined(CONFIG_SYSLOG_PREFIX)
   /* Prepend the prefix, if available */
 
-                    "[%s] "
+                             "[%s] "
 #endif
 #if CONFIG_TASK_NAME_SIZE > 0 && defined(CONFIG_SYSLOG_PROCESS_NAME)
   /* Prepend the thread name */
 
-                    "%s: "
+                             "%s: "
 #endif
-                    "%pV"
 #ifdef CONFIG_SYSLOG_TIMESTAMP
 #  if defined(CONFIG_SYSLOG_TIMESTAMP_FORMATTED)
 #    if defined(CONFIG_SYSLOG_TIMESTAMP_FORMAT_MICROSECOND)
-                    , date_buf, ts.tv_nsec / NSEC_PER_USEC
+                             , date_buf, ts.tv_nsec / NSEC_PER_USEC
 #    else
-                    , date_buf
+                             , date_buf
 #    endif
 #  else
-                    , (uintmax_t)ts.tv_sec, ts.tv_nsec / NSEC_PER_USEC
+                             , (uintmax_t)ts.tv_sec
+                             , ts.tv_nsec / NSEC_PER_USEC
 #  endif
 #endif
 
 #if defined(CONFIG_SMP)
-                    , up_cpu_index()
+                             , up_cpu_index()
 #endif
 
 #if defined(CONFIG_SYSLOG_PROCESSID)
   /* Prepend the Thread ID */
 
-                    , nxsched_gettid()
+                             , (int)nxsched_gettid()

Review Comment:
   ```suggestion
                                , nxsched_gettid()
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to