Sidebar

How do I increase JBOSS log settings?

0 votes
408 views
asked Mar 24, 2015 by mike-r-7535 (13,830 points)

I am getting errors from our Webservice calls to the JBOSS server.  However when I go to the JBOSS server, I don't see any activity in the JBOSS logs.  How do I increase the logging level?

1 Answer

0 votes

The logging level settings are defined in a configuration file called log4j.xml.  From the jboss home directory, search for 'log4j.xml'.  Look for the instances inside the deploy directory which match the webservice context. Here is an example:

jboss\server\default\deploy\Default.ear\init\log4j.xml

Edit this file. Change category medispan to WARN. The medispan logging tends to generate a lot of entries. (If you need the medispan logging you can always turn it back to DEBUG.)

  <category additivity="true" name="com.gehcit.cp.infrastructure.medispan"> 
    <priority value="WARN"/> 
  </category>
 
Add this category logging after the medispan reference:
 
  <category additivity="true" name="org.apache.cxf.phase.PhaseInterceptorChain">
    <priority value="DEBUG"/>
  </category>

PhaseInterceptorChain logs the webservice errors before returning the webservice result. Once completed debugging, you should change the logging level from DEBUG to ERROR.

The different Log Levels are:
  • FATAL: shows messages at a FATAL level only
  • ERROR: Shows messages classified as ERROR and FATAL
  • WARNING: Shows messages classified as WARNING, ERROR, and FATAL
  • INFO: Shows messages classified as INFO, WARNING, ERROR, and FATAL
  • DEBUG: Shows messages classified as DEBUG, INFO, WARNING, ERROR, and FATAL
JBOSS will periodically recheck the log4j.xml file and update its logging level appropriately.  In production, this logging level should not remain for long periods of time. So, once the logs have been collected, change the logging level back to ERROR.
 
To view the logs go to:
jboss\server\default\log

 

answered Mar 24, 2015 by mike-r-7535 (13,830 points)
...