mirror of
https://github.com/apache/nuttx.git
synced 2026-05-12 01:42:49 +08:00
eeb4a0de83
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>