From eabb2fbf384286d90323f9f002e10ea8e7e7cde6 Mon Sep 17 00:00:00 2001 From: Fotis Panagiotopoulos Date: Mon, 18 Jan 2021 11:38:41 +0200 Subject: [PATCH] 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 b4441df080..8ba1e456c3 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 */