Instrument agent logging

Logging internals instrumentation.  @peterbourgon @bernerdschaefer 
Thanks for catching that.  It's not used anywhere.  It was part of an attempt to be able to get rid of the time.Sleep() statements that didn't work out.