Convert rust_log.cpp to Rust, closes #8703

I've started working on #8703.

RUST_LOG="::help" should work, I hope I'll be able to finish the rest this weekend.