Avoid corrupting message payload while logging.
Merge pull request #308 from hindessm/avoid-debug-payload-corruption

Avoid corrupting message payload while logging.