Added log4j logging using PatternLayout.