Skip to content

Commit

Permalink
Disable SYSLOG_DEFAULT by default
Browse files Browse the repository at this point in the history
Because the implementation is problematic.
See apache#14662 for the discussion.
Also, make it depend on EXPERIMENTAL to discourage it.

Instead, enable SYSLOG_CONSOLE for a bit more cases.

An alternative would be to introduce/extend some serialization
mechanism (eg. enter_critical_section, which is currently used by
the serial driver to interact with interrupts) to cover up_putc
users including SYSLOG_DEFAULT. While it works, it doesn't sound
attractive to me to introduce this kind of complexity to up_putc,
which is supposed to be a very low-level machinary used early in
the boot. Also, the implementation of such serialization can be
complex because how up_putc works is basically device-specific and
how it corresponds to other devices on the system (eg. uarts) isn't
obvious to the upper layers.
  • Loading branch information
yamt committed Nov 8, 2024
1 parent faee89b commit 6b57624
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions drivers/syslog/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -267,19 +267,25 @@ config SYSLOG_STREAM

config SYSLOG_CONSOLE
bool "Log to /dev/console"
default !ARCH_LOWPUTC && !SYSLOG_CHAR && !RAMLOG_SYSLOG && !SYSLOG_RPMSG && !SYSLOG_RTT
default !SYSLOG_CHAR && !RAMLOG_SYSLOG && !SYSLOG_RPMSG && !SYSLOG_RTT
depends on DEV_CONSOLE
select SYSLOG_REGISTER
---help---
Use the system console as a SYSLOG output device.

config SYSLOG_DEFAULT
bool "Default SYSLOG device"
default ARCH_LOWPUTC && !SYSLOG_CHAR && !RAMLOG_SYSLOG && !SYSLOG_RPMSG && !SYSLOG_RTT && !SYSLOG_CONSOLE
default n
depends on EXPERIMENTAL
---help---
syslog() interfaces will be present, but all output will go to the
up_putc(ARCH_LOWPUTC == y) or bit-bucket(ARCH_LOWPUTC == n).

CAVEAT: The current implementation of this functionality might
interfere the other activities on the console device, especially
with SMP. (Thus marked EXPERIMENTAL.)
See https://github.com/apache/nuttx/issues/14662.

endif

if RAMLOG_SYSLOG
Expand Down

0 comments on commit 6b57624

Please sign in to comment.