Move the logic for munging the data to a loggable form out of the logger