Make logging configurable - #265