tracing-test
tracing-test copied to clipboard
Capture logs from the `log` crate with `tracing-log`
tracing-log can capture logs from the log crate, it just needs to be initialized by the proc-macro. This is a nice complement to the no-env-filter feature added in #16. Especially when you have dependencies that use log and you need tests to capture those logs for failure analysis.
My current workaround is adding the init manually to every test:
#[test]
#[traced_test]
fn test_frobnicator() {
let _ = tracing_log::LogTracer::init();
todo!()
}