How to log all sql going through JBoss datasource with log4j

Posted by Ichorus on Stack Overflow See other posts from Stack Overflow or by Ichorus
Published on 2010-04-05T17:21:53Z Indexed on 2010/04/06 20:03 UTC
Read the original article Hit count: 294

Filed under:
|
|
|
|

I've looked at log4jdbc (which does not support datasources), p6spy which seems to be what I am looking for but it has not been updated since 2003 which makes me nervous and lists only JBoss 3.x (we use JBoss 5), and JAMon which seems heavyweight for what I am trying to accomplish (a simple log of all SQL statements running through a JBoss application server).

I was hoping that JBoss itself would have a switch to log all the sql (as Websphere does) but I cannot find any documentation for it so that functionality might not exist.

© Stack Overflow or respective owner

Related posts about jboss

Related posts about logging