fix #https://github.com/hazelcast/hazelcast/issues/325

* some minor improvements for object creation prevent if no logging needed
* some minor code cleanup (extract constant)