Logging efficiently in Rust