Remus - My problem got resolved, but partially. I was able to log my application specific messages to a separate log file. However, as my EAR file contains a Jar module (EJBs) and these EJBs internally uses other plain JAR files, so my log4j configuration only works for the EJBs.
For the plain Jar files, the logging is still happening in JBoss server logs.
Anyone having any idea of how to get log4j working for dependant Jars (present in the lib folder of EAR).
Thanks in advance,
Regards,
Karan