60 releases

0.1.61 Sep 23, 2024
0.1.59 Jun 26, 2024
0.1.54 Feb 6, 2024
0.1.52 Dec 25, 2023
0.1.21 Nov 26, 2022

#3 in #micro-kernel

Download history 99/week @ 2024-07-22 436/week @ 2024-07-29 143/week @ 2024-08-05 144/week @ 2024-08-12 83/week @ 2024-08-19 177/week @ 2024-08-26 46/week @ 2024-09-02 71/week @ 2024-09-09 202/week @ 2024-09-16 540/week @ 2024-09-23 209/week @ 2024-09-30 137/week @ 2024-10-07 132/week @ 2024-10-14 126/week @ 2024-10-21 37/week @ 2024-10-28 208/week @ 2024-11-04

513 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

~3.5MB
~79K SLoC