Limit length of metadata decode debug output

Limit the size of the raw metadata that gets printed when debug logging is enabled.
Actually, I changed my mind; I am fine with making the cap a parameter to `data_log_string` as you did.