syslog/emerg: fix bug about printing LOG_EMERG log from iob buffer

The patch is related to: commit 5f7c98b6e1

Author: Xiang Xiao <xiaoxiang@xiaomi.com>
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 <xiaoxiang@xiaomi.com>

Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
This commit is contained in:
Jiuzhu Dong 2021-06-02 10:25:18 +08:00 committed by Gustavo Henrique Nihei
parent 57d823b69d
commit e21fddbb34
1 changed files with 1 additions and 4 deletions

View File

@ -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;