Improve log4j performance under mutli-threaded env. (based on log4j-1.2.17)