Skip to main content

Module log

Module log 

Source
Expand description

Safe, ergonomic logging facilities for cFS.

§System log and console

The [log!] and [printf!] macros write to the cFE System Log and the OSAL console, respectively.

§Event Services (EVS)

The [info!], [warn!], and [err!] macros send EVS events with println!-like formatting. The event ID is derived from the source line number automatically.

info!("system nominal")?;
warn!("temperature high: {} C", temp)?;
err!("{} failed", subsystem)?;

Constants§

EVS_MAX_MSG_SIZE
The maximum formatted EVS message size, from cFE mission config.
MAX_PRINTF_MSG_SIZE
The maximum size of a single OS_printf message, from OSAL configuration.
SYSLOG_MAX_MSG_SIZE
The maximum size of a single cFE System Log message, from cFE configuration.

Functions§

printf
Writes a message string to the OSAL console (OS_printf).
printf_disable
Disables output from the printf! macro and the underlying OS_printf function.
printf_enable
Enables output from the printf! macro and the underlying OS_printf function.
syslog
Writes a message to the cFE system log.