From e21fddbb34b20e1e804bb694537a40b90da7044c Mon Sep 17 00:00:00 2001 From: Jiuzhu Dong Date: Wed, 2 Jun 2021 10:25:18 +0800 Subject: [PATCH] syslog/emerg: fix bug about printing LOG_EMERG log from iob buffer The patch is related to: commit 5f7c98b6e1b6da9f4765572a63ac678d407c8095 Author: Xiang Xiao Date: Mon May 17 22:38:22 2021 +0800 drivers/syslog: Remove emergstream implementation and caller since emergstream always call syslog_force, but syslog_force is designed for the interrupt context, and then doesn't mean any emergency thing. On the other hand, emergstream has other bad side effect: 1.Can't output to file or dev channel 2.Can't work well with the interrupt buffer Signed-off-by: Xiang Xiao Signed-off-by: Jiuzhu Dong --- drivers/syslog/vsyslog.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/syslog/vsyslog.c b/drivers/syslog/vsyslog.c index 65243d4c1c..063f15491b 100644 --- a/drivers/syslog/vsyslog.c +++ b/drivers/syslog/vsyslog.c @@ -223,10 +223,7 @@ int nx_vsyslog(int priority, FAR const IPTR char *fmt, FAR va_list *ap) #ifdef CONFIG_SYSLOG_BUFFER /* Flush and destroy the syslog stream buffer */ - if (priority != LOG_EMERG) - { - syslogstream_destroy(&stream); - } + syslogstream_destroy(&stream); #endif return ret;