Update for structured logging

Also a small bit of refactoring and fixing a race.
Merge pull request #26 from iron-io/structured-logging

Update for structured logging