Added conditional logging of hibernate SQL