JBoss AS 6 and Log4j -


i know there plenty of posts out there on topic, not finding of them helpful or relevant.

i have simple requirement. moving jboss 4.0.4 jboss 6. in 4.0.4 environment have log4j.xml in server/myconfig/conf folder, , log4j.jar in server/myconfig/lib. realise jboss 6 has changed native logging framework. heavily dependent on log4j , changing not practical. have seen many posts saying package log4j jar , log4j.xml file in application. have dozens of jar , war files in deploy , lib. expected package log4j.jar , log4j.xml of them? hope not, maybe setting -djboss.as.logging.per-deployment=false help? still see people saying put log4j.jar , log4j.xml ear/war files set.

if please tell me how can mimic 4.0.4 set please.

thanks, paul

i think there no need package log4j jar inside application.

do below things :

1.) set following parameter in standalone.conf.bat file set "java_opts=%java_opts% -dorg.jboss.as.logging.per-deployment=false

2.) make 1 module log4j. inside modules folder log4j. reference can check other folder there.

3.) make 1 jboss-deployment-structure.xml place inside web-inf folder. file contain below thing

<jboss-deployment-structure>     <deployment>         <include>             <module name="org.apache.log4j" />         </include>     </deployment> </jboss-deployment-structure> 

it include log4j jar in application.


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -