But this way logs will be displayed even in successful tests. It would be great if logs were captured by the rust test system. This way test logs will be displayed only on error or if -- --nocapture is set.
Other popular crate env_logger provides is_test function. This way logs will be printed using println. This is what I proposing to add to flexi_logger as well.
I can show logging in tests using the following:
But this way logs will be displayed even in successful tests. It would be great if logs were captured by the rust test system. This way test logs will be displayed only on error or if
-- --nocapture
is set.Other popular crate env_logger provides is_test function. This way logs will be printed using
println
. This is what I proposing to add toflexi_logger
as well.