How to disable logging in JBoss 7 / EAP6?

The current application, for which its own log4j dependency is used, but this becomes a problem for deployment on JBoss EAP6 / AS7, as it always rolls back the deployment due to a logging problem.

Therefore, I follow the instructions on the Internet using the following command

standalone.sh -Dorg.jboss.as.logging.per-deployment=false 

The good news is it works. Now I can deploy the application without error stopping the deployment.

The sad part is that I cannot convince the client to always start the server with this condition.

So my question is: how to make such a change constantly in the application?

I'm trying to add

 <exclusions> <module name="org.apache.log4j" /> <module name="org.apache.commons.logging" /> <module name="org.jboss.logging" /> <module name="org.jboss.logging.jul-to-slf4j-stub" /> <module name="org.jboss.logmanager" /> <module name="org.jboss.logmanager.log4j" /> <module name="org.jboss.as.logging" /> <!--Including this trouble guy--> <module name="org.slf4j" /> </exclusions> 

But it does not work .... So what can I do?

+4
source share
1 answer

Add these lines to standalone.xml or domain.xml :

 <system-properties> <property name="org.jboss.as.logging.per-deployment" value="false"/> </system-properties> 

You can ( recommended ) do this through the CLI. To do this, follow these steps:

  • cd JBOSS_HOME / bin /
  • /jboss-cli.sh
  • connecting
  • /system-property=org.jboss.as.logging.per-deployment:add (value = false). Result: {"result" => "success"}

You must use these changes in your standalone.xml or domain.xml file.

Hope this helps!

+5
source

Source: https://habr.com/ru/post/1482080/


All Articles