You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2021/01/18 13:38:06 UTC

[incubator-nuttx] branch master updated: Re-arranged syslog fields.

This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new eabb2fb  Re-arranged syslog fields.
eabb2fb is described below

commit eabb2fbf384286d90323f9f002e10ea8e7e7cde6
Author: Fotis Panagiotopoulos <f....@gmail.com>
AuthorDate: Mon Jan 18 11:38:41 2021 +0200

    Re-arranged syslog fields.
---
 drivers/syslog/vsyslog.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/syslog/vsyslog.c b/drivers/syslog/vsyslog.c
index b4441df..8ba1e45 100644
--- a/drivers/syslog/vsyslog.c
+++ b/drivers/syslog/vsyslog.c
@@ -172,10 +172,6 @@ int nx_vsyslog(int priority, FAR const IPTR char *fmt, FAR va_list *ap)
   ret = 0;
 #endif
 
-#if defined(CONFIG_SYSLOG_PRIORITY)
-  ret += lib_sprintf(&stream.public, "[%6s] ", g_priority_str[priority]);
-#endif
-
 #if defined(CONFIG_SYSLOG_PROCESSID)
   /* Pre-pend the Process ID */
 
@@ -220,6 +216,12 @@ int nx_vsyslog(int priority, FAR const IPTR char *fmt, FAR va_list *ap)
     }
 #endif
 
+#if defined(CONFIG_SYSLOG_PRIORITY)
+  /* Pre-pend the message priority. */
+
+  ret += lib_sprintf(&stream.public, "[%6s] ", g_priority_str[priority]);
+#endif
+
 #if defined(CONFIG_SYSLOG_PREFIX)
   /* Pre-pend the prefix, if available */