Commit Graph

26 Commits

Author SHA1 Message Date
Matias N
cf8521e6de syslog: add option to prefix process name 2021-03-11 19:40:48 -03: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
Fotis Panagiotopoulos
eabb2fbf38 Re-arranged syslog fields. 2021-01-18 05:37:55 -08:00
chao.an
efe236ba84 drivers/syslog: Prepend Process ID to syslog message
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-01-16 18:38:18 -08:00
Fotis Panagiotopoulos
cb78dadc4b Added color output to syslog. 2021-01-16 16:17:16 -08:00
Fotis Panagiotopoulos
946443e190 Added printing of log priority in syslog. 2021-01-16 08:56:24 -08:00
Fotis Panagiotopoulos
c11413a258 Added formatted timestamps in syslog. 2021-01-14 07:55:22 -06:00
YAMAMOTO Takashi
f8d6a85f90 drivers/syslog/vsyslog.c: Fix a printf format warning 2020-11-16 08:29:00 -08:00
Xiang Xiao
517974787f Rename clock_systime[r|spec] to clock_systime_[ticks|timespec]
follow up the new naming convention:
https://cwiki.apache.org/confluence/display/NUTTX/Naming+of+OS+Internal+Functions
2020-05-10 14:35:50 -06:00
Xiang Xiao
0f940e06f5 drivers/syslog/vsyslog.c: nx_syslog's return value should include the timestamp length 2018-11-09 08:35:20 -06:00
Xiang Xiao
1ee6083de3 Squashed commit of the following:
drivers/syslog:  Channel configuration.  Decouple SYSLOG_SERIAL_CONSOLE and ARCH_LOWPUTC.  Since some hardware can output log to the special debug channel not serial.

    drivers/syslog/vsyslog.c: Support pre-pending a prefix string to log output if enabled.  This very useful to identify which cpu send out the log in AMP SoC.

    drivers/syslog/vsyslog.c: Make timestamp output same as linux kernel.  It's very useful if NuttX syslog retarget to Linux syslog.
2018-08-26 06:49:35 -06:00
Gregory Nutt
de6b13b3ab Per OpenGroup.org, syslog -- and, hence, nonstandard vsyslog, and debug wrappers -- does not return a value. Rename _vsyslog to nx_vsyslog. Use internal nx_vsyslog in the few cases where a return value is required. 2018-03-04 08:07:07 -06:00
Jussi Kivilinna
9fc5f44ef6 syslog: CONFIG_CLOCK_MONOTONIC 2017-08-04 08:02:52 -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
Gregory Nutt
b5c1dd09f5 Syslog: Need inclusion of errno.h for fix building with CONFIG_SYSLOG_TIMESTMAP=y 2017-05-11 07:15:57 -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
Jussi Kivilinna
e835803166 yslog: use monotonic clock for timestamp when available 2017-04-26 10:38:15 -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
2b445ddccc Remove lowsyslog(). The new syslog() includes all of the functionality of lowsyslog(). No longer any need for two interfaces. 2016-06-20 08:57:08 -06:00
Gregory Nutt
fa365e85f5 Update some cmoments 2016-06-20 06:11:22 -06:00
Gregory Nutt
7dd66a4620 Need to pass va_list as a reference to vsyslog. This is because va_list is a structure in some compilers and passing of structures in the NuttX sycalls does not work. 2016-06-19 14:50:00 -06:00
Gregory Nutt
5b2aa7bf99 Remove all traces of CONFIG_SYSLOG 2016-06-19 13:59:43 -06:00
Gregory Nutt
34f776dce9 Move the OS intensive part of vsyslog and vlowsyslog to drivers/syslog/vsyslog.c and vlowsyslog.c. Also move lib_syslogstrem to drivers/syslog/syslogstream.c 2016-06-19 07:56:24 -06:00