More control over logging
Merge pull request #420 from theopolis/feature-better-logging

More control over logging