Logging api

Refactorings to support testing logging interface. @bernerdschaefer @peterbourgon 
Please revert to shorter names `inc, outc`