Truncate logged strings and byte slices