Allow to override logger

This allows to control more easily what is being logged and how.