mirror of
https://github.com/apache/nuttx.git
synced 2026-02-06 12:42:21 +08:00
Documentation: Add description for early_syslog()
Some checks failed
Build Documentation / build-html (push) Has been cancelled
Some checks failed
Build Documentation / build-html (push) Has been cancelled
Add documentation describing the purpose and behavior of early_syslog(), which provides a minimal logging facility available during early system initialization or system down. Signed-off-by: Chengdong Wang wangchengdong@lixiang.com
This commit is contained in:
committed by
Alan C. Assis
parent
378a827a7a
commit
76dcec8f4b
@@ -67,6 +67,26 @@ The above are all standard interfaces as defined at
|
||||
Those interfaces are available for use by application software.
|
||||
The remaining interfaces discussed in this section are non-standard, OS-internal interfaces.
|
||||
|
||||
Early Syslog Interfaces
|
||||
-----------------------
|
||||
|
||||
Provides a minimal SYSLOG output facility that can be used during the
|
||||
very early boot phase or when the system is in a down state, before the
|
||||
full SYSLOG subsystem or scheduler becomes available.
|
||||
|
||||
.. c::function:: void early_syslog(FAR const char *fmt, ...);
|
||||
|
||||
See ``include/nuttx/syslog/syslog.h``.
|
||||
This function provides basic formatted output similar to printf(),
|
||||
and writes the resulting characters directly to the low-level output
|
||||
device via up_putc(). It is primarily intended for debugging or
|
||||
diagnostic messages in early system contexts, where interrupts may
|
||||
be disabled and locking mechanisms are not yet available.
|
||||
|
||||
The function automatically appends a newline character ('\n') if
|
||||
the formatted message does not already end with one, ensuring proper
|
||||
alignment of log output in serial consoles or early boot traces.
|
||||
|
||||
Debug Interfaces
|
||||
----------------
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
############################################################################
|
||||
# Include SYSLOG Infrastructure
|
||||
|
||||
if(CONFIG_ARCH_LOWPUTC)
|
||||
ifeq ($(CONFIG_ARCH_LOWPUTC),y)
|
||||
CSRCS += syslog_early.c
|
||||
endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user