Configuring log4j using property file. Kept log4j.properties in resources and it is working.