Enable automatic use of the
log crate in tests.
Currently, the only way to have
trace!() messages print during tests is to start a logger at the start of
every test. This is annoying.
cargo test should automatically start a logger when testing any
crate which depends on the
log crate. The binary produced by
should collect these log messages, save them to a file, and pretty-print them
when a test fails. It should also have command-line options for adjusting the
It makes the
log crate special, by giving it special support directly in
log is already special (by being the de-facto logging facade
used throughout the rust ecosystem) and if some alternative logging facade ever
becomes popular there’s no reason cargo couldn’t have built-in support for it as well.