Option to disable logger

This is a simple change to support disabling the logger. Seems like it's super useful for the tests, because it makes they way less noisy.