2012-08-02 19:09:25 +02:00
|
|
|
#
|
|
|
|
# For a description of the syntax of this configuration file,
|
2015-06-28 16:08:57 +02:00
|
|
|
# see the file kconfig-language.txt in the NuttX tools repository.
|
2012-08-02 19:09:25 +02:00
|
|
|
#
|
|
|
|
|
2016-06-21 17:59:09 +02:00
|
|
|
menu "System Logging"
|
2012-08-02 19:09:25 +02:00
|
|
|
|
2016-06-19 17:52:34 +02:00
|
|
|
# Selected if the architecture has its own, built-in SYSLOGging enabled
|
2016-06-18 22:54:25 +02:00
|
|
|
|
2016-06-19 19:16:12 +02:00
|
|
|
config ARCH_SYSLOG
|
2016-06-19 17:21:52 +02:00
|
|
|
bool
|
|
|
|
default n
|
2016-06-18 22:54:25 +02:00
|
|
|
|
2021-06-03 15:51:10 +02:00
|
|
|
comment "SYSLOG options"
|
|
|
|
|
2021-03-13 16:37:19 +01:00
|
|
|
config SYSLOG_MAX_CHANNELS
|
|
|
|
int "Maximum SYSLOG channels"
|
|
|
|
default 1
|
|
|
|
---help---
|
|
|
|
Maximum number of supported SYSLOG channels.
|
|
|
|
|
2012-08-02 19:09:25 +02:00
|
|
|
config RAMLOG
|
|
|
|
bool "RAM log device support"
|
|
|
|
default n
|
|
|
|
---help---
|
|
|
|
This is a driver that was intended to support debugging output,
|
|
|
|
aka syslogging, when the normal serial output is not available.
|
|
|
|
For example, if you are using a telnet or USB serial console,
|
|
|
|
the debug output will get lost. However, the RAMLOG device should
|
|
|
|
be usable even if system logging is disabled.
|
|
|
|
|
|
|
|
This driver is similar to a pipe in that it saves the debugging
|
|
|
|
output in a FIFO in RAM. It differs from a pipe in numerous
|
|
|
|
details as needed to support logging.
|
|
|
|
|
|
|
|
if RAMLOG
|
|
|
|
config RAMLOG_CRLF
|
|
|
|
bool "RAMLOG CR/LF"
|
|
|
|
default n
|
|
|
|
---help---
|
2016-06-22 18:08:20 +02:00
|
|
|
Pre-pend a carriage return before every linefeed that goes into the
|
|
|
|
RAM log.
|
2012-08-02 19:09:25 +02:00
|
|
|
|
|
|
|
config RAMLOG_NONBLOCKING
|
|
|
|
bool "RAMLOG non-block reads"
|
|
|
|
default y
|
|
|
|
---help---
|
|
|
|
Reading from the RAMLOG will never block if the RAMLOG is empty. If the RAMLOG
|
|
|
|
is empty, then zero is returned (usually interpreted as end-of-file).
|
|
|
|
|
|
|
|
config RAMLOG_NPOLLWAITERS
|
|
|
|
int "RAMLOG number of poll waiters"
|
|
|
|
default 4
|
|
|
|
---help---
|
|
|
|
The maximum number of threads that may be waiting on the poll method.
|
|
|
|
|
2020-07-28 09:29:43 +02:00
|
|
|
config RAMLOG_OVERWRITE
|
|
|
|
bool "RAMLOG overwrite circular buffer"
|
|
|
|
default n
|
|
|
|
---help---
|
|
|
|
Enable overwrite of circular buffer. If RAMLOG buffer overflows,
|
|
|
|
overwrite it from the top of buffer and always keep the latest log.
|
|
|
|
|
2022-02-28 14:39:59 +01:00
|
|
|
config RAMLOG_POLLTHRESHOLD
|
|
|
|
int "The threshold value of circular buffer to notify poll waiters"
|
|
|
|
default 1
|
|
|
|
---help---
|
|
|
|
When the length of circular buffer exceeds the threshold value, the poll() will
|
|
|
|
return POLLIN to all poll waiters.
|
2012-08-02 19:09:25 +02:00
|
|
|
endif
|
2015-02-08 13:53:24 +01:00
|
|
|
|
2017-05-10 22:42:43 +02:00
|
|
|
config SYSLOG_BUFFER
|
|
|
|
bool "Use buffered output"
|
|
|
|
default n
|
|
|
|
---help---
|
|
|
|
Enables an buffering logic that will be used to serialize debug
|
|
|
|
output from concurrent tasks. This enables allocation of one buffer
|
2017-05-11 01:36:08 +02:00
|
|
|
per thread, each of size CONFIG_IOB_BUFSIZE.
|
2017-05-10 22:42:43 +02:00
|
|
|
|
|
|
|
The use of SYSLOG buffering is optional. If not enabled, however,
|
|
|
|
then the output from multiple tasks that attempt to generate SYSLOG
|
|
|
|
output may be interleaved and difficult to read.
|
|
|
|
|
2023-05-23 14:14:58 +02:00
|
|
|
if SYSLOG_BUFFER
|
|
|
|
|
|
|
|
config SYSLOG_BUFSIZE
|
|
|
|
int "Syslog buffer size"
|
|
|
|
default 64
|
|
|
|
---help---
|
|
|
|
The size of the syslog buffer in bytes.
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
2016-06-19 17:47:13 +02:00
|
|
|
config SYSLOG_INTBUFFER
|
|
|
|
bool "Use interrupt buffer"
|
|
|
|
default n
|
|
|
|
---help---
|
|
|
|
Enables an interrupt buffer that will be used to serialize debug
|
|
|
|
output from interrupt handlers.
|
|
|
|
|
|
|
|
config SYSLOG_INTBUFSIZE
|
|
|
|
int "Interrupt buffer size"
|
|
|
|
default 512
|
|
|
|
depends on SYSLOG_INTBUFFER
|
|
|
|
---help---
|
|
|
|
The size of the interrupt buffer in bytes.
|
2016-06-19 16:46:46 +02:00
|
|
|
|
2021-06-03 15:51:10 +02:00
|
|
|
comment "Formatting options"
|
|
|
|
|
2016-06-19 16:46:46 +02:00
|
|
|
config SYSLOG_TIMESTAMP
|
|
|
|
bool "Prepend timestamp to syslog message"
|
|
|
|
default n
|
|
|
|
---help---
|
|
|
|
Prepend timestamp to syslog message.
|
|
|
|
|
2017-08-04 16:02:52 +02:00
|
|
|
config SYSLOG_TIMESTAMP_REALTIME
|
|
|
|
bool "Use wall-clock for syslog timestamp"
|
|
|
|
default n
|
|
|
|
depends on SYSLOG_TIMESTAMP
|
|
|
|
---help---
|
|
|
|
Use wall-clock (CLOCK_REALTIME) for timestamp. By default,
|
2022-04-11 12:35:11 +02:00
|
|
|
CLOCK_MONOTONIC will be used.
|
2017-08-04 16:02:52 +02:00
|
|
|
|
2020-12-29 15:23:27 +01:00
|
|
|
config SYSLOG_TIMESTAMP_FORMATTED
|
|
|
|
bool "Formatted syslog time"
|
|
|
|
default n
|
|
|
|
depends on SYSLOG_TIMESTAMP_REALTIME
|
|
|
|
---help---
|
|
|
|
Syslog timestamp will be formatted according to the
|
2021-05-11 11:41:29 +02:00
|
|
|
SYSLOG_TIMESTAMP_FORMAT format string.
|
2020-12-29 15:23:27 +01:00
|
|
|
|
|
|
|
config SYSLOG_TIMESTAMP_LOCALTIME
|
|
|
|
bool "Use local-time timestamp"
|
|
|
|
default n
|
|
|
|
depends on SYSLOG_TIMESTAMP_FORMATTED
|
|
|
|
---help---
|
|
|
|
If selected local time will be used for the timestamps.
|
|
|
|
Else, timestamps will be in UTC.
|
|
|
|
|
|
|
|
config SYSLOG_TIMESTAMP_FORMAT
|
|
|
|
string "Time format"
|
2022-06-05 13:58:01 +02:00
|
|
|
default "%d/%m/%y %H:%M:%S"
|
2020-12-29 15:23:27 +01:00
|
|
|
depends on SYSLOG_TIMESTAMP_FORMATTED
|
|
|
|
---help---
|
|
|
|
Formatter string for syslog timestamp printing.
|
|
|
|
Uses the standard "strftime" format specifiers.
|
|
|
|
|
2022-03-09 09:15:50 +01:00
|
|
|
config SYSLOG_TIMESTAMP_FORMAT_MICROSECOND
|
|
|
|
bool "Append microseconds after seconds"
|
|
|
|
default y
|
2022-06-05 13:58:01 +02:00
|
|
|
depends on SYSLOG_TIMESTAMP_FORMAT = "%d/%m/%y %H:%M:%S"
|
2022-03-09 09:15:50 +01:00
|
|
|
|
2020-12-29 15:23:27 +01:00
|
|
|
config SYSLOG_TIMESTAMP_BUFFER
|
|
|
|
int "Formatted timestamp buffer size"
|
|
|
|
default 64
|
|
|
|
depends on SYSLOG_TIMESTAMP_FORMATTED
|
|
|
|
---help---
|
|
|
|
Buffer size to store syslog formatted timestamps.
|
|
|
|
|
2021-01-14 16:43:20 +01:00
|
|
|
config SYSLOG_PRIORITY
|
|
|
|
bool "Prepend priority to syslog message"
|
|
|
|
default n
|
|
|
|
---help---
|
|
|
|
Prepend log priority (severity) to syslog message.
|
|
|
|
|
2021-03-10 21:21:28 +01:00
|
|
|
config SYSLOG_PROCESS_NAME
|
2021-12-14 08:52:49 +01:00
|
|
|
bool "Prepend process name to syslog message"
|
2021-03-10 21:21:28 +01:00
|
|
|
default n
|
|
|
|
---help---
|
|
|
|
Prepend Process name to syslog message.
|
|
|
|
|
2021-01-16 12:24:53 +01:00
|
|
|
config SYSLOG_PROCESSID
|
2021-03-10 21:21:28 +01:00
|
|
|
bool "Prepend process ID to syslog message"
|
2021-01-16 12:24:53 +01:00
|
|
|
default n
|
|
|
|
---help---
|
|
|
|
Prepend Process ID to syslog message.
|
|
|
|
|
2018-08-26 14:49:35 +02:00
|
|
|
config SYSLOG_PREFIX
|
|
|
|
bool "Prepend prefix to syslog message"
|
|
|
|
default n
|
|
|
|
---help---
|
|
|
|
Prepend prefix to syslog message.
|
|
|
|
|
|
|
|
config SYSLOG_PREFIX_STRING
|
|
|
|
string "Prefix string"
|
|
|
|
depends on SYSLOG_PREFIX
|
|
|
|
---help---
|
|
|
|
The prefix string to be prepend.
|
|
|
|
|
2021-03-10 21:21:28 +01:00
|
|
|
config SYSLOG_COLOR_OUTPUT
|
|
|
|
bool "Colored syslog output"
|
|
|
|
default n
|
|
|
|
---help---
|
|
|
|
Enables colored output in syslog, according to message priority.
|
|
|
|
|
2021-06-03 15:51:10 +02:00
|
|
|
comment "SYSLOG channels"
|
|
|
|
|
2022-06-27 05:30:02 +02:00
|
|
|
config SYSLOG_DEVPATH
|
|
|
|
string "System log device"
|
2023-02-04 13:22:19 +01:00
|
|
|
default "/dev/kmsg" if RAMLOG_SYSLOG
|
|
|
|
default "/dev/ttyS1" if !RAMLOG_SYSLOG
|
2022-06-27 05:30:02 +02:00
|
|
|
---help---
|
|
|
|
The full path to the system logging device. For the RAMLOG SYSLOG device,
|
|
|
|
this is normally "/dev/kmsg". For character SYSLOG devices, it should be
|
|
|
|
some other existing character device (or file) supported by the configuration
|
|
|
|
(such as "/dev/ttyS1")/
|
|
|
|
|
2021-05-11 11:41:29 +02:00
|
|
|
if !ARCH_SYSLOG
|
2016-06-21 17:59:09 +02:00
|
|
|
config SYSLOG_CHAR
|
|
|
|
bool "Log to a character device"
|
2021-05-11 11:41:29 +02:00
|
|
|
default n
|
2016-06-19 16:46:46 +02:00
|
|
|
---help---
|
|
|
|
Enable the generic character device for the SYSLOG. The full path to the
|
|
|
|
SYSLOG device is provided by SYSLOG_DEVPATH. A valid character device (or
|
|
|
|
file) must exist at this path. It will by opened by syslog_initialize.
|
|
|
|
|
2016-06-21 17:59:09 +02:00
|
|
|
config RAMLOG_SYSLOG
|
|
|
|
bool "Use RAMLOG for SYSLOG"
|
2021-05-11 11:41:29 +02:00
|
|
|
depends on RAMLOG
|
|
|
|
default n
|
2016-06-21 17:59:09 +02:00
|
|
|
---help---
|
|
|
|
Use the RAM logging device for the syslogging interface. If this
|
|
|
|
feature is enabled (along with SYSLOG), then all debug output (only)
|
|
|
|
will be re-directed to the circular buffer in RAM. This RAM log can
|
2019-11-08 14:43:24 +01:00
|
|
|
be viewed from NSH using the 'dmesg' command.
|
2016-06-21 17:59:09 +02:00
|
|
|
|
2019-11-02 18:30:33 +01:00
|
|
|
config SYSLOG_RPMSG
|
|
|
|
bool "Log to RPMSG"
|
2022-04-04 19:06:05 +02:00
|
|
|
depends on RPTUN
|
2019-11-02 18:30:33 +01:00
|
|
|
depends on SCHED_WORKQUEUE
|
2021-05-11 11:41:29 +02:00
|
|
|
default n
|
2019-11-02 18:30:33 +01:00
|
|
|
---help---
|
2023-10-27 12:56:33 +02:00
|
|
|
Use the RPMSG as a SYSLOG output device, send message to remote proc.
|
2019-11-02 18:30:33 +01:00
|
|
|
|
2022-11-24 08:20:17 +01:00
|
|
|
config SYSLOG_STREAM
|
|
|
|
bool "Log to stream"
|
|
|
|
default n
|
|
|
|
---help---
|
|
|
|
Enables support to use stream as syslog backend, such as block out stream.
|
|
|
|
It is recommended to implement the backend stream in a way that syslog
|
|
|
|
works in interrupt context.
|
|
|
|
|
2022-01-31 09:14:05 +01:00
|
|
|
config SYSLOG_CONSOLE
|
|
|
|
bool "Log to /dev/console"
|
2022-01-31 09:37:29 +01:00
|
|
|
default !ARCH_LOWPUTC && !SYSLOG_CHAR && !RAMLOG_SYSLOG && !SYSLOG_RPMSG && !SYSLOG_RTT
|
2022-01-31 09:14:05 +01:00
|
|
|
depends on DEV_CONSOLE
|
|
|
|
---help---
|
|
|
|
Use the system console as a SYSLOG output device.
|
|
|
|
|
2020-02-22 17:15:59 +01:00
|
|
|
config SYSLOG_DEFAULT
|
|
|
|
bool "Default SYSLOG device"
|
2022-01-31 09:37:29 +01:00
|
|
|
default ARCH_LOWPUTC && !SYSLOG_CHAR && !RAMLOG_SYSLOG && !SYSLOG_RPMSG && !SYSLOG_RTT && !SYSLOG_CONSOLE
|
2016-06-21 17:59:09 +02:00
|
|
|
---help---
|
|
|
|
syslog() interfaces will be present, but all output will go to the
|
2020-02-22 17:15:59 +01:00
|
|
|
up_putc(ARCH_LOWPUTC == y) or bit-bucket(ARCH_LOWPUTC == n).
|
2016-06-21 17:59:09 +02:00
|
|
|
|
2021-05-11 11:41:29 +02:00
|
|
|
endif
|
|
|
|
|
2022-01-31 09:14:05 +01:00
|
|
|
if RAMLOG_SYSLOG
|
|
|
|
|
|
|
|
config RAMLOG_BUFFER_SECTION
|
|
|
|
string "The section where ramlog buffer is located"
|
|
|
|
---help---
|
|
|
|
The section where ramlog buffer is located.
|
|
|
|
The section shall not be initialized on system boot.
|
|
|
|
|
|
|
|
config RAMLOG_BUFSIZE
|
|
|
|
int "RAMLOG buffer size"
|
|
|
|
default 1024
|
|
|
|
---help---
|
|
|
|
Size of the console RAM log. Default: 1024
|
|
|
|
|
|
|
|
endif # RAMLOG_SYSLOG
|
|
|
|
|
|
|
|
if SYSLOG_RPMSG
|
|
|
|
|
2021-05-11 11:41:29 +02:00
|
|
|
config SYSLOG_RPMSG_SERVER_NAME
|
2023-10-27 12:56:33 +02:00
|
|
|
string "The name of Syslog RPMSG Server"
|
2021-05-11 11:41:29 +02:00
|
|
|
---help---
|
2023-10-27 12:56:33 +02:00
|
|
|
The proc name of RPMSG server. Client sends message to
|
2021-05-11 11:41:29 +02:00
|
|
|
specified name of remote proc.
|
2016-06-21 17:59:09 +02:00
|
|
|
|
2019-11-02 18:30:33 +01:00
|
|
|
config SYSLOG_RPMSG_WORK_DELAY
|
|
|
|
int "SYSLOG RPMSG work delay(ms)"
|
|
|
|
default 100
|
|
|
|
|
2022-06-27 05:30:02 +02:00
|
|
|
config SYSLOG_RPMSG_CHARDEV
|
2023-10-27 12:56:33 +02:00
|
|
|
bool "SYSLOG RPMSG character device"
|
2023-05-08 15:46:32 +02:00
|
|
|
default SYSLOG_RPMSG_WORK_DELAY != 0
|
2022-06-27 05:30:02 +02:00
|
|
|
|
2022-01-31 09:14:05 +01:00
|
|
|
endif # SYSLOG_RPMSG
|
|
|
|
|
2019-11-02 18:30:33 +01:00
|
|
|
config SYSLOG_RPMSG_SERVER
|
|
|
|
bool "Enable RPMSG server for SYSLOG"
|
|
|
|
default n
|
2022-04-04 19:06:05 +02:00
|
|
|
depends on RPTUN
|
2019-11-02 18:30:33 +01:00
|
|
|
---help---
|
2023-10-27 12:56:33 +02:00
|
|
|
Use RPMSG to receive message from remote proc.
|
2019-11-02 18:30:33 +01:00
|
|
|
|
2022-06-28 08:55:35 +02:00
|
|
|
config SYSLOG_RPMSG_SERVER_CHARDEV
|
2023-10-27 12:56:33 +02:00
|
|
|
bool "SYSLOG RPMSG server character device"
|
2022-06-28 08:55:35 +02:00
|
|
|
default n
|
|
|
|
|
2021-06-03 15:51:10 +02:00
|
|
|
menuconfig SYSLOG_FILE
|
2018-07-09 02:24:45 +02:00
|
|
|
bool "Syslog file output"
|
2016-06-21 20:25:15 +02:00
|
|
|
default n
|
|
|
|
---help---
|
2018-07-09 02:24:45 +02:00
|
|
|
Build in support to use a file to collect SYSLOG output. File SYSLOG
|
2016-06-21 20:25:15 +02:00
|
|
|
channels differ from other SYSLOG channels in that they cannot be
|
|
|
|
established until after fully booting and mounting the target file
|
|
|
|
system. The function syslog_file_channel() would need to be called
|
|
|
|
from board-specific bring-up logic AFTER mounting the file system
|
|
|
|
containing 'devpath'.
|
|
|
|
|
|
|
|
NOTE interrupt level SYSLOG output will be lost in this case unless
|
|
|
|
the interrupt buffer is used.
|
|
|
|
|
2021-06-03 15:51:10 +02:00
|
|
|
if SYSLOG_FILE
|
|
|
|
|
2021-06-08 12:17:31 +02:00
|
|
|
config SYSLOG_FILE_SEPARATE
|
|
|
|
bool "Log file separation"
|
|
|
|
default n
|
|
|
|
---help---
|
|
|
|
If enabled, every time the file logger is re-attached, a separator
|
|
|
|
will be printed in the file.
|
2023-02-25 19:14:11 +01:00
|
|
|
|
2021-06-08 12:17:31 +02:00
|
|
|
This can be useful to easily distinguish between log entries that
|
2023-02-25 19:14:11 +01:00
|
|
|
belong to different log sessions (e.g. system reboot), and to
|
2021-06-08 12:17:31 +02:00
|
|
|
indicate that between the separated lines there may be more logs
|
|
|
|
that were lost.
|
|
|
|
|
2021-06-04 11:12:25 +02:00
|
|
|
config SYSLOG_FILE_ROTATIONS
|
|
|
|
int "Log file rotations"
|
|
|
|
default 0
|
2021-06-03 15:51:10 +02:00
|
|
|
---help---
|
2021-06-04 11:12:25 +02:00
|
|
|
If enabled (set to a non-zero number), the log file size will be
|
|
|
|
checked before opening. If it is larger than the specified limit
|
|
|
|
it will be "rotated", i.e. the old file will be kept as a backup,
|
|
|
|
and a new empty file will be created.
|
2023-02-25 19:14:11 +01:00
|
|
|
|
2021-06-04 11:12:25 +02:00
|
|
|
The number of rotations specifies the number of old log files to
|
|
|
|
keep.
|
2023-02-25 19:14:11 +01:00
|
|
|
|
2021-06-03 15:51:10 +02:00
|
|
|
This option is useful to ensure that log files do not get
|
|
|
|
huge after prolonged periods of system operation.
|
|
|
|
|
|
|
|
config SYSLOG_FILE_SIZE_LIMIT
|
|
|
|
int "Log file size limit"
|
|
|
|
default 524288
|
2021-06-04 11:12:25 +02:00
|
|
|
depends on SYSLOG_FILE_ROTATIONS > 0
|
2021-06-03 15:51:10 +02:00
|
|
|
---help---
|
|
|
|
File size limit when the log is rotated automatically.
|
|
|
|
If a log file is found larger than this limit, it will
|
|
|
|
be rotated.
|
|
|
|
|
|
|
|
endif # SYSLOG_FILE
|
|
|
|
|
2016-06-21 17:59:09 +02:00
|
|
|
config CONSOLE_SYSLOG
|
|
|
|
bool "Use SYSLOG for /dev/console"
|
|
|
|
default n
|
|
|
|
depends on DEV_CONSOLE && !SYSLOG_CONSOLE
|
|
|
|
---help---
|
|
|
|
Use the syslog logging device as a system console. If this feature is
|
|
|
|
enabled (along with DEV_CONSOLE), then all console output will be
|
|
|
|
re-directed to syslog output (syslog_putc). This is useful, for
|
|
|
|
example, if the only console is a Telnet console. Then in that case,
|
|
|
|
console output from non-Telnet threads will go to the syslog output.
|
2016-06-19 16:46:46 +02:00
|
|
|
|
2016-07-05 20:58:18 +02:00
|
|
|
config SYSLOG_CHARDEV
|
|
|
|
bool "SYSLOG character device"
|
|
|
|
default n
|
|
|
|
---help---
|
2021-11-23 08:55:46 +01:00
|
|
|
Enables support for a simple character driver at /dev/log whose
|
2016-07-05 20:58:18 +02:00
|
|
|
write() method will transfer data to the SYSLOG device. This can be
|
|
|
|
useful if, for example, you want to redirect the output of a program
|
|
|
|
to the SYSLOG.
|
|
|
|
|
|
|
|
NOTE that unlike other syslog output, this data is unformatted raw
|
|
|
|
byte output with no time-stamping or any other SYSLOG features
|
|
|
|
supported.
|
|
|
|
|
2023-07-04 11:33:04 +02:00
|
|
|
config SYSLOG_IOCTL
|
|
|
|
bool "SYSLOG IOCTL support"
|
|
|
|
default n
|
|
|
|
---help---
|
|
|
|
Enables support for the SYSLOG IOCTL command. This command is used
|
|
|
|
to control the behavior of the SYSLOG device. Currently, the supported
|
|
|
|
commands are SYSLOGIOC_SETFILTER/SYSLOGIOC_GETCHANNELS, which can be
|
|
|
|
used to set the enable status of different channels
|
|
|
|
|
2016-06-21 17:59:09 +02:00
|
|
|
endmenu # System logging
|