embassy/embassy-usb-logger
Ulf Lilleengen a2b7b0c8e0
Merge pull request #2414 from JomerDev/usb-logger-without-device
Adds function and macro to create usb logger without device (also fixes a logger issue)
2024-02-12 20:04:57 +00:00
..
src Move usb clas loop to private function 2024-02-12 19:01:22 +01:00
Cargo.toml Release embassy-usb-logger v0.1.0 2024-01-14 23:02:19 +01:00
README.md Centralize license and MSRV boilerplate into the repo readme. 2024-01-11 18:18:35 +01:00

embassy-usb-logger

USB implementation of the log crate. This logger can be used by any device that implements embassy-usb. When running, it will output all logging done through the log facade to the USB serial peripheral.

Usage

Add the following embassy task to your application. The Driver type is different depending on which HAL you use.

#[embassy_executor::task]
async fn logger_task(driver: Driver<'static, USB>) {
   embassy_usb_logger::run!(1024, log::LevelFilter::Info, driver);
}