Truncate arguments before logging

Hey folks,

We're having some issues with really long arguments and/or arguments that can end up with unprintable characters in the terminal. 

This PR adds a bit of sanitizing to the logging.

cc @airhorns