decoupled logging with factory interface

later I want to move to event system so that users can use their own
logging factory if they like