modified logging function to truncate output and adjusted error output formatting tests to be compatible with both the new and old runtimes
fixed the buffer to make it a more reasonable size
auto merge of #8250 : brson/rust/logging-fixes, r=brson

Updated from #8241