use system debug setting and log with correct level.
log only the first 1000 characters of json response. can be several megabytes
Merge pull request #174 from tamland/logspam

Logging fixes