Change logging to only be enabled in debug mode

This should aide in performance benefits when doing large populations (though the developer should still disable SQL logging as well).
thanks. it is actually not a big issue for us, i just stumbled over it while looking for examples as i made the same mistake in FOSHttpCacheBundle. just thought you would want to clean it up. will have a look at your current solution then.