Make it possible to disable logging
One more logging fix