50 releases

0.1.51 Dec 1, 2023
0.1.50 Oct 31, 2023
0.1.47 Sep 12, 2023
0.1.44 Jul 19, 2023
0.1.21 Nov 26, 2022

#268 in Debugging

Download history 299/week @ 2023-08-18 281/week @ 2023-08-25 281/week @ 2023-09-01 460/week @ 2023-09-08 496/week @ 2023-09-15 276/week @ 2023-09-22 203/week @ 2023-09-29 627/week @ 2023-10-06 495/week @ 2023-10-13 512/week @ 2023-10-20 592/week @ 2023-10-27 519/week @ 2023-11-03 636/week @ 2023-11-10 737/week @ 2023-11-17 771/week @ 2023-11-24 657/week @ 2023-12-01

2,861 downloads per month
Used in 8 crates (7 directly)

MIT/Apache

265KB
6K 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

~2.5MB
~52K SLoC