Adjusting code to use Log4j as logging Framework