xiaoxiang781216 commented on code in PR #8012:
URL: https://github.com/apache/nuttx/pull/8012#discussion_r1060147023


##########
drivers/syslog/vsyslog.c:
##########
@@ -35,10 +35,32 @@
 
 #include "syslog.h"
 
+/****************************************************************************
+ * Pre-processor definitions
+ ****************************************************************************/
+
+#ifndef CONFIG_SYSLOG_TMP_BUFFER_SIZE
+#define CONFIG_SYSLOG_TMP_BUFFER_SIZE 128
+#endif
+
 /****************************************************************************
  * Private Data
  ****************************************************************************/
 
+#if defined(CONFIG_SYSLOG_COLOR_OUTPUT)
+static FAR const char * const g_priority_color[] =
+  {
+    "\e[31;1;5m", /* LOG_EMERG, Red, Bold, Blinking */
+    "\e[31;1m",   /* LOG_ALERT, Red, Bold */
+    "\e[31;1m",   /* LOG_CRIT, Red, Bold */
+    "\e[31m",     /* LOG_ERR, Red */
+    "\e[33m",     /* LOG_WARNING, Yellow */
+    "\e[1m",      /* LOG_NOTICE, Bold */
+    "",           /* LOG_INFO, Normal */
+    "\e[2m",      /* LOG_DEBUG, Dim */
+  };
+#endif
+
 #if defined(CONFIG_SYSLOG_PRIORITY)
 static FAR const char * g_priority_str[] =

Review Comment:
   dd const before g_priority_str?



##########
drivers/syslog/vsyslog.c:
##########
@@ -35,10 +35,32 @@
 
 #include "syslog.h"
 
+/****************************************************************************
+ * Pre-processor definitions
+ ****************************************************************************/
+
+#ifndef CONFIG_SYSLOG_TMP_BUFFER_SIZE
+#define CONFIG_SYSLOG_TMP_BUFFER_SIZE 128

Review Comment:
   CONFIG_SYSLOG_TMP_BUFFER_SIZE->TMP_BUFSIZE



##########
drivers/syslog/vsyslog.c:
##########
@@ -35,10 +35,32 @@
 
 #include "syslog.h"
 
+/****************************************************************************
+ * Pre-processor definitions
+ ****************************************************************************/
+
+#ifndef CONFIG_SYSLOG_TMP_BUFFER_SIZE
+#define CONFIG_SYSLOG_TMP_BUFFER_SIZE 128
+#endif
+
 /****************************************************************************
  * Private Data
  ****************************************************************************/
 
+#if defined(CONFIG_SYSLOG_COLOR_OUTPUT)
+static FAR const char * const g_priority_color[] =
+  {
+    "\e[31;1;5m", /* LOG_EMERG, Red, Bold, Blinking */
+    "\e[31;1m",   /* LOG_ALERT, Red, Bold */
+    "\e[31;1m",   /* LOG_CRIT, Red, Bold */
+    "\e[31m",     /* LOG_ERR, Red */
+    "\e[33m",     /* LOG_WARNING, Yellow */
+    "\e[1m",      /* LOG_NOTICE, Bold */
+    "",           /* LOG_INFO, Normal */
+    "\e[2m",      /* LOG_DEBUG, Dim */
+  };
+#endif
+
 #if defined(CONFIG_SYSLOG_PRIORITY)
 static FAR const char * g_priority_str[] =

Review Comment:
   add const before g_priority_str?



-- 
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: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to