Added debug info to CAPI calls.

We are currently getting spikes in traffic and it is not easy to figure out exactly where they came from.
Merge pull request #3714 from guardian/capi-debug

Added debug info to CAPI calls.