diff --git a/drivers/syslog/syslog_stream.c b/drivers/syslog/syslog_stream.c index 04bb0726b0..ac7e144ceb 100644 --- a/drivers/syslog/syslog_stream.c +++ b/drivers/syslog/syslog_stream.c @@ -82,9 +82,9 @@ static void syslogstream_putc(FAR struct lib_outstream_s *this, int ch) iob->io_len++; this->nput++; - /* Is the buffer full? Did we encounter a new line? */ + /* Is the buffer full? */ - if (iob->io_len >= CONFIG_IOB_BUFSIZE || ch == '\n') + if (iob->io_len >= CONFIG_IOB_BUFSIZE) { /* Yes.. then flush the buffer */ diff --git a/drivers/syslog/vsyslog.c b/drivers/syslog/vsyslog.c index cbb8588240..94e818dc04 100644 --- a/drivers/syslog/vsyslog.c +++ b/drivers/syslog/vsyslog.c @@ -130,6 +130,10 @@ int _vsyslog(int priority, FAR const IPTR char *fmt, FAR va_list *ap) ret = lib_vsprintf(&stream.public, fmt, *ap); + /* Flush the output */ + + stream.public.flush(&stream.public); + #ifdef CONFIG_SYSLOG_BUFFER /* Destroy the syslog stream buffer */