Logging api

Refactorings to support testing logging interface. @bernerdschaefer @peterbourgon 
I'll change it back reluctantly, but consider that you're already familiar
with the larger body of code and its architecture.  In that framework it
seems obvious what this does.  Now it seems obvious to me too, but last
night, not already understanding the interplay of the components it was not
at all clear.  When it clicked I cussed at the names.

If it wasn't obvious to me, then it might not be obvious to others in this
company who have to read the code, and aren't already going to have the
relationships between all the pieces in their head.  Do we want to optimize
solely for our sense of aesthetics, or do we want to make the code
comprehensible by others?


-jeff



On Tue, Aug 5, 2014 at 6:14 PM, Alexander Simmerl <notifications@github.com>
wrote:

> In harpoon-agent/registry.go:
>
> >
> > -	go func(c *container, outc chan agent.ContainerInstance) {
> > -		inc := make(chan agent.ContainerInstance)
> > -		c.Subscribe(inc)
> > -		defer c.Unsubscribe(inc)
> > +	// Forward the container's state changes to all subscribers.
> > +	go func(c Container, outStatec chan agent.ContainerInstance) {
>
> I second @peterbourgon <https://github.com/peterbourgon> sentiment. All
> information needed to understand the meaning of those channels and what
> types they carry are graspable with one look.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/soundcloud/harpoon/pull/21/files#r15822984>.
>