use repr() for logging (thanks @hodgestar)