Skip to main content

init_test_logging

Function init_test_logging 

Source
pub fn init_test_logging()
Expand description

Install a tracing subscriber that routes through print! so cargo test captures per-test output. Logs only appear with --nocapture or for failing tests via --show-output. Honors RUST_LOG (defaulting to error when unset). Safe to call repeatedly.