usb-logger: fix breakage in log 0.4.19

https://github.com/rust-lang/log/issues/567
This commit is contained in:
Dario Nieuwenhuis 2023-06-12 16:37:36 +02:00
parent ab86b06050
commit 8d5f995a01

View file

@ -138,7 +138,7 @@ macro_rules! run {
( $x:expr, $l:expr, $p:ident ) => {
static LOGGER: ::embassy_usb_logger::UsbLogger<$x> = ::embassy_usb_logger::UsbLogger::new();
unsafe {
let _ = ::log::set_logger_racy(&LOGGER).map(|()| log::set_max_level($l));
let _ = ::log::set_logger_racy(&LOGGER).map(|()| log::set_max_level_racy($l));
}
let _ = LOGGER.run(&mut ::embassy_usb_logger::LoggerState::new(), $p).await;
};