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/12/11 16:09:07 UTC

[incubator-nuttx] branch master updated: syslog: Add [] around the prefix like others

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 3d6a5a2  syslog: Add [] around the prefix like others
3d6a5a2 is described below

commit 3d6a5a2d0d3a5a4a30a54fbafdca136b95177c67
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Fri Dec 10 15:43:10 2021 +0800

    syslog: Add [] around the prefix like others
    
    make the output format consistent
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 drivers/syslog/vsyslog.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/syslog/vsyslog.c b/drivers/syslog/vsyslog.c
index 9420a38..3b23a1c 100644
--- a/drivers/syslog/vsyslog.c
+++ b/drivers/syslog/vsyslog.c
@@ -200,7 +200,7 @@ int nx_vsyslog(int priority, FAR const IPTR char *fmt, FAR va_list *ap)
 #if defined(CONFIG_SYSLOG_PREFIX)
   /* Prepend the prefix, if available */
 
-  ret += lib_sprintf(&stream.public, "%s", CONFIG_SYSLOG_PREFIX_STRING);
+  ret += lib_sprintf(&stream.public, "[%s] ", CONFIG_SYSLOG_PREFIX_STRING);
 #endif
 
 #if CONFIG_TASK_NAME_SIZE > 0 && defined(CONFIG_SYSLOG_PROCESS_NAME)