java ee - Configure log files for specific application in Weblogic -


i using weblogic 11g, ejb3.0.

i struggling weeks problem.

i have several deployments(stateless beans).

each 1 has it's own log4j jar (log4j-1.2.15.jar) , each 1 has it's own log4j.properties.

problem is: when write log(debug/error/info etc.) logs deployments written same log file.

this annoying since want each deployment write it's own , only log file (which configured in it's log4j.properties)

this log4j.properties file:

log4j.rootcategory=debug, r

log4j.appender.r=org.apache.log4j.rollingfileappender

the next line has different path+name in each project.

log4j.appender.r.file=d\:\bea11\user_projects\domains\base_domain\autodeploy\myproject\logs\myproject.log

log4j.appender.r.maxfilesize=8192kb

log4j.appender.r.maxbackupindex=100

log4j.appender.r.layout=org.apache.log4j.patternlayout

log4j.appender.r.layout.conversionpattern=%d{dd mmm yyyy hh:mm:ss} %p %m%n

log4j.logger.org.hibernate=info

log4j.logger.org.hibernate.sql=debug

log4j.logger.org.hibernate.type=info

log4j.logger.org.hibernate.tool.hbm2ddl=info

log4j.logger.org.hibernate.cache=info

my project divided 3 dependencies in myeclipse:

projectname

projectnameejb

projectnameweb

and have installed in in weblogic exploded archive

the jar located under dir path: projectname/ear/app-inf/lib/log4j-1.2.15.jar

and log4j.properties located under root dir: projectname/log4j.properties

thanks, ray

must locate properties.xml under app-inf/classes

and the log4j.jar under app-inf/lib

and make sure dont have log4j.jar under server/lib dir.


Comments

Popular posts from this blog

c++ - Is it possible to compile a VST on linux? -

java - Output of Eclipse is rubbish -

jquery - Confused with JSON data and normal data in Django ajax request -