61 releases

new 0.1.62 Dec 2, 2024
0.1.61 Sep 23, 2024
0.1.59 Jun 26, 2024
0.1.54 Feb 6, 2024
0.1.21 Nov 26, 2022

#435 in Operating systems

Download history 148/week @ 2024-08-11 106/week @ 2024-08-18 168/week @ 2024-08-25 56/week @ 2024-09-01 71/week @ 2024-09-08 83/week @ 2024-09-15 631/week @ 2024-09-22 226/week @ 2024-09-29 139/week @ 2024-10-06 137/week @ 2024-10-13 120/week @ 2024-10-20 40/week @ 2024-10-27 174/week @ 2024-11-03 50/week @ 2024-11-10 130/week @ 2024-11-17 70/week @ 2024-11-24

426 downloads per month
Used in 8 crates (7 directly)

MIT/Apache

255KB
5.5K SLoC

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);
    }
}

Dependencies

~4.5MB
~101K SLoC