Instrument agent logging

Logging internals instrumentation.  @peterbourgon @bernerdschaefer 
1. How about `stoplogc`?
2. Is this actually used anywhere?
3. Can you `defer close(stoplogc)`?