Improve logging calls

Make logging calls more resilient by parameterizing values, rather than simply
presenting the logger with a single monolothic message. Doing this prevents the
logger from choking on non-ascii inputs.

Ensure that information about an API request is logged out before the request
made, not after the API request completes.
Merge pull request #1134 from Ichimonji10/better-logging

Improve logging calls