Made logging configurable