xous-core/api/xous-api-log
bunnie dbb0a75118 bump versions
have to absorb a version change due to xous-semver change

might as well also update the utra/svd generator dependencies
since that's been held off for a long time now.
2025-10-06 13:23:18 +08:00
..
src format xous-api-log 2024-01-14 18:50:49 +08:00
Cargo.toml bump versions 2025-10-06 13:23:18 +08:00
README.md fix inconsistency in Cargo.toml file 2022-10-05 17:00:18 +08:00

Xous API: Log

API calls to access the Xous logging service. Provides glue between the log crate, the Xous kernel and the hardware.

Every process that relies on the logging service should call xous_api_log::init_wait() before using any log calls.

Below is a minimal example of how to use the logging service.

fn main() -> ! {
    xous_api_log::init_wait().unwrap();
    log::set_max_level(log::LevelFilter::Info);
    log::info!("my PID is {}", xous::process::id());

    let timeout = std::time::Duration::from_millis(1000);
    let mut count = 0;
    loop {
        log::info!("test loop {}", count);
        count += 1;
        std::thread::sleep(timeout);
    }
}