Closed dmitry-zakablukov closed 4 months ago
Good day.
This pr suggests some API updates to support log callbacks.
Log callback setup:
let mut context = rusb::Context::new()?; context.set_log_level(rusb::LogLevel::Info); let cb = Box::new(move |level: rusb::LogLevel, text: String| { println!(log_file, "[{:#?}] {}", level, text).ok(); }); context.set_log_callback(cb, rusb::LogCallbackMode::Context);
You can take this changes as a base for your own API or just merge it as is.
Thank you. LGTM.
Good day.
This pr suggests some API updates to support log callbacks.
Log callback setup:
You can take this changes as a base for your own API or just merge it as is.