Added logging infrastructure and logging around requests and responses.