gbaldeck87 Posted October 6, 2014 Posted October 6, 2014 Some background first. I'm using Jaspersoft Studio 5.6.0 Final and have followed the instructions here 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.I thought that following the instructions at the link above and then adding log4j.logger.net.sf.jasperreports.engine.query.JRJdbcQueryExecuter=debug to my log4j-config.properties file would let me see the output SQL, but it's not working.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?I need to get this working so I can fix my query. Any help is greatly appreciated.
djohnson53 Posted October 6, 2014 Posted October 6, 2014 gbalddeck87,I noticed that you were having problems with our Anti-Spam system. I've adjusted it to trust you.
mlopez_1 Posted October 7, 2014 Posted October 7, 2014 You can only view SQL query generated when you run reports directly in server using web interface.Regards, Mariano
Solution kkumlien Posted October 24, 2017 Solution Posted October 24, 2017 You can print out information to the console as described in How to get Jaspersoft Studio logging output from within scriptlet.Or you probably want to enable FINE-level logging for the specific class you're interested in. See Configuring Apache Commons Logging and Log4J in Jaspersoft Studio (the article you referred to) and https://community.jaspersoft.com/questions/841628/it-possible-log-generated-sql-jasper-studio for an example.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now