Optimize logging
In many places we call getLogger in the method instead of using the global logger variable. Also some logging message are formatted before the call instead of let the logger do the formatting which is better as if the level is not activated, no formatting is done.