Description
When debugging a large Miri trace, I like to put the trace into a file that I can analyze and search through in an editor. Unfortunately, since the recent logging changes, that leads to a lot of garbage in the file:
2:rustc│ │ │ │ │ │ ├─�[2m0�[0m�[2mms�[0m �[1;32m INFO�[0m �[2mrustc_mir::interpret::step�[0m Retag([fn entry] _1)
2:rustc│ │ │ │ │ │ ├─�[2m0�[0m�[2mms�[0m �[1;32m INFO�[0m �[2mrustc_mir::interpret::step�[0m StorageLive(_2)
2:rustc│ │ │ │ │ │ ├─�[2m0�[0m�[2mms�[0m �[1;32m INFO�[0m �[2mrustc_mir::interpret::step�[0m StorageLive(_3)
2:rustc│ │ │ │ │ │ ├─�[2m0�[0m�[2mms�[0m �[1;32m INFO�[0m �[2mrustc_mir::interpret::step�[0m _3 = move _1
2:rustc│ │ │ │ │ │ ├─�[2m0�[0m�[2mms�[0m �[1;32m INFO�[0m �[2mrustc_mir::interpret::step�[0m Retag(_3)
2:rustc│ │ │ │ │ │ ├─�[2m0�[0m�[2mms�[0m �[1;32m INFO�[0m �[2mrustc_mir::interpret::step�[0m _2 = std::mem::ManuallyDrop::<std::boxed::Box<T, A>>::new(move _3) -> [return: bb1, unwind: bb5]
2:rustc│ │ │ │ │ │ ├┐�[2mrustc_mir::interpret::eval_context�[0m::�[1;32mframe�[0m std::boxed::Box::<alloc::collections::btree::node::LeafNode<std::string::String, i32>>::into_unique
2:rustc│ │ │ │ │ │ │└┐�[2mrustc_mir::interpret::eval_context�[0m::�[1;32mframe�[0m std::mem::ManuallyDrop::<std::boxed::Box<alloc::collections::btree::node::LeafNode<std::string::String, i32>>>::new
2:rustc│ │ │ │ │ │ │ ├─�[2m0�[0m�[2mms�[0m �[1;32m INFO�[0m �[2mrustc_mir::interpret::step�[0m // executing bb0
2:rustc│ │ │ │ │ │ │ ├─�[2m0�[0m�[2mms�[0m �[1;32m INFO�[0m �[2mrustc_mir::interpret::step�[0m Retag([fn entry] _1)
2:rustc│ │ │ │ │ │ │ ├─�[2m0�[0m�[2mms�[0m �[1;32m INFO�[0m �[2mrustc_mir::interpret::step�[0m StorageLive(_2)
2:rustc│ │ │ │ │ │ │ ├─�[2m0�[0m�[2mms�[0m �[1;32m INFO�[0m �[2mrustc_mir::interpret::step�[0m _2 = move _1
2:rustc│ │ │ │ │ │ │ ├─�[2m0�[0m�[2mms�[0m �[1;32m INFO�[0m �[2mrustc_mir::interpret::step�[0m Retag(_2)
Looks like the color escape sequences are printed even when redirecting to a file. This makes working with the logfile much harder than it was before. Is there a way to fix that?
Cc @oli-obk