This is an automated email from the ASF dual-hosted git repository. xiaoxiang781216 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit c6f01086f01a74e5eed0cadd8a096b1827d29763 Author: Marco Casaroli <[email protected]> AuthorDate: Thu Oct 29 16:34:49 2026 +0100 Documentation: Describe openlog() and closelog(). openlog() and closelog() are now functions of libc, and syslog() uses the ident and the options of openlog(). Mark them as supported in the POSIX table, and describe them on the logging page. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Marco Casaroli <[email protected]> --- Documentation/reference/user/14_logging.rst | 8 ++++++-- Documentation/standards/posix.rst | 4 ++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Documentation/reference/user/14_logging.rst b/Documentation/reference/user/14_logging.rst index b8a2c6bfde0..51abe09156a 100644 --- a/Documentation/reference/user/14_logging.rst +++ b/Documentation/reference/user/14_logging.rst @@ -9,8 +9,12 @@ configured in various ways to select how these messages are displayed Applications can emit logging messages using the standard :c:func:`syslog` interface. -.. note:: The standard :c:func:`openlog` and :c:func:`closelog` - are not currently supported. +.. note:: :c:func:`openlog` sets the ident (up to 31 characters) and the + options of the process: :c:func:`syslog` puts ``ident: `` before each + message, ``ident[pid]: `` with ``LOG_PID``, and writes the message to + stderr too with ``LOG_PERROR``. The messages that the OS prints while the + process runs get the same prefix. NuttX does not use the other options or + the facility. :c:func:`closelog` has no descriptor to close. .. c:function:: void syslog(int priority, const char *fmt, ...) diff --git a/Documentation/standards/posix.rst b/Documentation/standards/posix.rst index e7c1f902466..cb800fae34c 100644 --- a/Documentation/standards/posix.rst +++ b/Documentation/standards/posix.rst @@ -2472,9 +2472,9 @@ XSI System Logging: +--------------------------------+---------+ | API | Support | +================================+=========+ -| :c:func:`closelog` | No | +| :c:func:`closelog` | Yes | +--------------------------------+---------+ -| :c:func:`openlog` | No | +| :c:func:`openlog` | Yes | +--------------------------------+---------+ | :c:func:`setlogmask` | Yes | +--------------------------------+---------+
