-
1. Re: How to Enable SQL Trace in jboss-5.1.0.GA
andey Nov 26, 2017 11:50 PM (in response to nitharose)There are two steps to enabling logging of the JBossManagedConnectionPool.
1#Uncomment or add the following entry in <JBOSS HOME>/server/<profile>/conf/jboss-log4j.xml
~~~
<category name="org.jboss.resource.connectionmanager.JBossManagedConnectionPool">
<priority value="TRACE"/>
</category>
~~~
2#The EAP instance must read the new value via one of the following:
- restart of the server instance
- allow the amount of time specified by the RefreshPeriod in conf/xmdesc/Log4jService-xmbean.xml to elapse before the change is noted by the EAP instance.
- change the setting via the Log4jService
~~~
http://<HOST>:8080/jmx-console/HtmlAdaptor?action=inspectMBean&name=jboss.system%3Atype%3DLog4jService%2Cservice%3DLogging
~~~
Note that custom configurations of appenders in <JBOSS HOME>/server/<profile>/conf/jboss-log4j.xml can modify where the expected output occurs. Occasionally this will need to be checked if TRACE logging is not seen when expected.
-
2. Re: How to Enable SQL Trace in jboss-5.1.0.GA
nitharose Dec 1, 2017 11:09 AM (in response to andey)Hi Anup - Thanks for the details.
- 1. I have uncommented JBossManagedConnectionPool in jboss-log4j.xml
- 2. I have restarted the server
Am unable to view the SQL statements logged in the server.log file. Am attaching the screenshot of the URL below. Could you please help and let me know if i need to do anything else.
Thanking you again for the reply. It is appreciated.