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).
we just debugged this. it does not work for 2 reasons: it seems that treatNullLike is evaluated before the defaultValue in this case, so it never happens (at least with our symfony 2.4). if it *would* work, it would always be true because parameters are not evaluated at this place. they are only evaluated when being passed into a service definition, as some other bundles do. i think if you really need this you would need to move the logic to the extension class. but maybe it would be enough to just configure the logger with the kernel.debug to decide on the log level, or just make it a null logger by default in non-debug mode.