Current Position:Home > How to create logs in to diff files for apps deploy on same OC4J instance?

How to create logs in to diff files for apps deploy on same OC4J instance?

Update:11-30Source: network consolidation
Advertisement
I am using OC4J 10.1.3.5 App server on Windows. I have deployed 2 web applications on the same instance of OC4J where I have defined the shared library. Both applications use Struts, Spring, iBatis, apache commons libraries which I have defined as a shared library. Part of the apache loggins library I had to add log4j jar as well. So indirectly log4j-12.16.jar is declared as a shared-lib as well.
I have log4j.properties for both application pointing to different log file. But still when both applications are deployed and running, the logs are getting populated on only one file. During the deployment, I did check on webapp-classpath-first="true" setting to explicitly have log4j.properties of each individual application being load first. But nothing makes difference.
Please help.
Thanks
Jasmin

The Best Answer

Advertisement
Jasmin,
Dependent on where the log4j library is installed it will use either one or separate configuration files. Placed in WEB-INF/lib then the log4j logger is initialized separately for the applications using separate configuration files. This is not the case when the log4j library is placed under home/applib.
regards,
Bernhard Jongejan
http://bernhardjongejan.spaces.live.com