Log executed sql query with Jasper Library

0

Hello,

I developed a java application (J2EE) which uses Jasper report library (precisely a maven dependency of the jasper library).

I would like to know if there is a way to log the executed sql query of the report, I mean the one which has been parsed by the jasper engine for parameter substitution... ?

Is there a way to enable logging of jasper from my main java-maven module ? Log4j configuration ?

 

thanks,

 

Sylvain

lilmeth's picture
Joined: Jul 9 2009 - 4:43am
Last seen: 6 years 5 months ago

1 Answer:

0

you can set this class to log level debug: net.sf.jasperreports.engine.query.JRJdbcQueryExecuter 

The createStatement method logs the SQL query string.

mrcaffeine's picture
1038
Joined: Nov 10 2008 - 3:38am
Last seen: 2 years 2 months ago
Feedback
randomness