Function logger::early_init
source · pub fn early_init(
log_level: Option<Level>,
serial_ports: impl IntoIterator<Item = SerialPort>
)
Expand description
Initializes Theseus’s early system logger for use before memory management is set up.
The early logger can save log messages to a statically-sized buffer and can also write log messages to a list of basic serial ports.
Arguments
log_level
: the log level that should be used. IfNone
, theDEFAULT_LOG_LEVEL
will be used.serial_ports
: an iterator of [SerialPort
]s that the logger will write log messages to. Typically this is just a single serial port, e.g.,COM1
.
This function will initialize the logger with a maximum of LOG_MAX_WRITERS
serial ports;
any additional ones in the given iterator beyond that will be ignored.