Xiang Xiao
69468b700d
libc: Move syslog_stream from nuttx/streams.h to drivers/syslog/syslog.h
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-12-14 00:51:59 -06:00
ligd
ff0cd0baac
Revert "drivers/syslog: Call up_puts in syslog_default_write instad up_putc"
...
This reverts commit 174b240325
.
Revert "drivers/syslog: Ensure the buffer zero terminate"
This reverts commit 1692aa7894
.
2021-11-01 06:54:05 -05:00
Xiang Xiao
1692aa7894
drivers/syslog: Ensure the buffer zero terminate
...
This patch fix the regression by:
commit 174b240325
Author: Xiang Xiao <xiaoxiang@xiaomi.com>
Date: Fri Sep 17 11:56:21 2021 +0800
drivers/syslog: Call up_puts in syslog_default_write instad up_putc
since some drivers(e.g. semihosting) have more fast implementation.
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-09-21 08:44:44 -03:00
Alin Jerpelea
ccff570e6f
drivers: nxstyle fixes
...
nxstyle fixes to pass the CI.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-03-04 18:32:27 -08:00
Alin Jerpelea
e5b6305f4a
drivers: Author Gregory Nutt: update licenses to Apache
...
Gregory Nutt has submitted the SGA and we can migrate the licenses
to Apache.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-03-04 18:32:27 -08:00
Juha Niskanen
8fa646f0e8
drivers/syslog: syslog_force does not set errno so do not test against it. Some changes to comments.
2019-09-16 07:48:48 -06:00
Anthony Merlino
70404ed0dc
Merged in antmerlino/nuttx/iobinstrumentation (pull request #1001 )
...
Iobinstrumentation
* mm/iob: Introduces producer/consumer id to every iob call. This is so that the calls can be instrumented to monitor the IOB resources.
* iob instrumentation - Merges producer/consumer enumeration for simpler IOB user.
* fs/procfs: Starts adding support for /proc/iobinfo
* fs/procfs: Finishes first pass of simple IOB user stastics and /proc/iobinfo entry
Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-16 22:42:25 +00:00
Jussi Kivilinna
0725be9773
drivers/syslog/syslog_stream.c: In syslog bufferedmode, avoid IOB alloc lock-up with heavy network activity. This change alters the buffered syslog logic to use 'iob_tryalloc' instead of blocking 'iob_alloc' to avoid syslog printing from getting stuck when all IOBs are depleted by network activity. An issue was seen when large incoming TCP transfer uses free IOB buffers and processing threads try to use syslog which then block at iob_alloc.
2019-04-03 07:35:38 -06:00
Gregory Nutt
7cf88d7dbd
Make sure that labeling is used consistently in all function headers.
2018-02-01 10:00:02 -06:00
Gregory Nutt
30f2927101
binfmt/, drivers/, graphics/: Fix several inappropriate accesses to get_errno() that were missed in previous changes (some going back to nuttx-.23).
2018-01-30 17:23:10 -06:00
Gregory Nutt
c84a3e3519
Bitbucket Issue 47: Some of last syslog changes needed to be condition on #ifdef CONFIG_SYSLOG_BUFFER in order to be built without syslog buffering enabled.
2017-05-12 07:58:11 -06:00
Gregory Nutt
1c9859520f
syslog: There is yet another place where the output can get split. That is in syslog_dev_write(): It will break up the stream to insert a CR before the LF. This can that can be avoid be generating the CR-LF sequence in the buffer and then detecting and ignoring valid CR-LF sequences, rather than expecting syslog_dev_write() to insert the CR in this case.
...
I don't like the idea that syslog_dev_write() still scans the entire output buffer to expand CR-LF sequence. This seems really wasteful, especially in this case where we can be sure that the is no CR or LF without a matching LF or CR. Bu, I think, the existing behavior in syslog_dev_write() must be retained because it is needed in other contexts.
2017-05-12 07:31:50 -06:00
Gregory Nutt
0fc068cc9c
syslog: Avoid flushing syslog_stream buffer, if possible, until lib_vsprintf() completely parses the format. This assures that the flush will flush the entire output, even data that may potentially follow the linefeed. And, in that case, it cannot be interleaved with other devug output. Suggested by Jussi Kivilinna.
2017-05-12 06:58:33 -06:00
Jussi Kivilinna
ba933efd9e
When syslog message has addition characters after last new-line. With buffering those now get lost as vsyslog does not flush output after lib_sprintf. Additional trailing characters could be ANSI escape sequence to reset state that message setups. For example, macro here uses colors and resets state after actual message (including '\n'):
...
With flushing added to vsyslog, then there is problem that next syslog line might come from other task before reset sequence, causing wrong line getting color. This could be avoided by not flushing on '\n' but only if IOB is full and/or at end of vsyslog. Would this make sense?
2017-05-11 07:11:35 -06:00
Gregory Nutt
d3b9f5b37f
Syslog buffering: Use IOBs to buffer data, not an on-stack buffer
2017-05-10 17:36:08 -06:00
Gregory Nutt
d8a83f16be
Syslog buffering: Various corrections from early debug
2017-05-10 16:13:21 -06:00
Gregory Nutt
20727d17c3
SYSLOG: Add option to buffer SYSLOG output to avoid interleaving.
2017-05-10 14:42:43 -06:00
Gregory Nutt
9f859774a1
setvbuf: Add support for configuration of line buffering.
2017-02-08 11:28:24 -06:00
Gregory Nutt
cf1375daf7
Break syslog_channel.c up into syslog_channel.c, syslog_putc.c, syslog_force.c and syslog_flush.c to limited what is brought into the link. Separate syslog_emergstream.c from syslog_stream.c. Didn't help in the case I was looking at.
2016-06-20 17:10:52 -06:00
Gregory Nutt
505ca542e8
Remove some last traces of lowvsyslog that were missed; Add a SYSLOG emergency channel for handling assertion output more cleanly
2016-06-20 16:11:50 -06:00
Gregory Nutt
9a19d64610
Reanem syslogstream.c to syslog_steam.c for consistency
2016-06-19 18:19:34 -06:00