walnux/libs/libc/syslog
Michal Lenc eeb4a0de83 setlogmask: fix setlogmask behavior according to POSIX standard
POSIX states "If the maskpri argument is 0, the current log mask is
not modified." The current implementation in NuttX doesn't
respect this and thus is in a clear violation with a strict POSIX
compliance rule in The Inviolable Principles of NuttX.

This commit therefore changes the behavior to the expected one. Passing
argument 0 doesn't change the current log mask, but just returns the
old one. Completely disabling logging at runtime is thus not possible,
but you may set the highest priority LOG_EMERG only to disable most of
the messages. Default can still be set to no logging with
CONFIG_SYSLOG_DEFAULT_MASK configuration option.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2025-05-02 16:29:08 +02:00
..
CMakeLists.txt syslog: add an option to completely disable syslog logic 2025-03-30 11:36:19 +08:00
lib_setlogmask.c setlogmask: fix setlogmask behavior according to POSIX standard 2025-05-02 16:29:08 +02:00
lib_syslog.c libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00
lib_syslog_none.c syslog: add an option to completely disable syslog logic 2025-03-30 11:36:19 +08:00
Make.defs syslog: add an option to completely disable syslog logic 2025-03-30 11:36:19 +08:00
syslog.h libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00