Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Step By Step configure logging in jboss 6.x with Log4j in Java

Hi all I am new to Jboss so I am get confused while setting up an logging in Jboss 6.1 what I does I have download and extract the Jboss (jboss-eap-6.1) on my machine then I follow the steps given in this article but still I not able to see the logging on console or in file

the I google it around and come to know that I have to write jboss-deployment-structure.xml file under /META-INF/ folder and have to add -Dorg.jboss.as.logging.per-deployment=false to the start-up of the server (which I dont know where I have to set this) from this link

so can any one give me steps to configure logging in jboss 6.x with Log4j or any logging like java.util.logging to log statements on console or in file thanks.

like image 683
Ashish Jagtap Avatar asked Oct 21 '22 00:10

Ashish Jagtap


1 Answers

You should find the standalone.bat file into the /bin folder of Jboss, then you should edit this file, finding the next line

rem Setup JBoss specific properties
set JAVA_OPTS=-Dprogram.‌​name=%PROGNAME% %JAVA_OPTS%

And replace for this

set "JAVA_OPTS= -Dorg.jboss.as.logging.per-deployment=false"

like image 115
havelino Avatar answered Nov 01 '22 16:11

havelino