title: Output SQL with log4j in Jaspersoft Studio
body: <p>Some background first. I'm using Jaspersoft Studio 5.6.0 Final and have followed the instructions <a href="http://community.jaspersoft.com/wiki/configuring-apache-commons-logging-and-log4j-jaspersoft-studio" rel="nofollow">here</a> to setup log4j. I'm trying to get log4j to output the SQL query when my report is run. I have a problem with the query and need to see the SQL outputed by Jaspersoft Studio. I have a working datasource setup so connection to the datasource is not a problem.</p>
  
  <p>I thought that following the instructions at the link above and then adding <code>log4j.logger.net.sf.jasperreports.engine.query.JRJdbcQueryExecuter=debug</code> to my <code>log4j-config.properties</code> file would let me see the output SQL, but it's not working.</p>
  
  <p>To run the report I compile the jrxml and then click the preview tab. Since I followed the instructions in the link above, shouldn't the SQL be outputed to my log4j log file when I do that?</p>
  
  <p>I need to get this working so I can fix my query. Any help is greatly appreciated.</p>