Convert rust_log.cpp to Rust, closes #8703