System logs capture any errors in JasperReports Server's code, but the logging levels can be configured to capture more information for debugging purposes. Log files are generated in JasperReports Server using the Apache log4j package. To view these files, users must have access to the file system where JasperReports Server is installed.
The default log file is C:\ReportServer\ReportServer\apache-tomcat\webapps\jasperserver-pro\WEB-INF\log/jasperserver.log and the default log configuration file is C:\ReportServer\ReportServer\apache-tomcat\webapps\jasperserver-pro\WEB-INF\log4j.properties. Log levels can be set through these files, or through the UI by following the below steps.
To set the current logging levels through the UI:
Log in to JasperReports Server as an administrator.
Navigate to Manage > Server Settings.
Click Log Settings on the panel to the left.
Use the drop-down lists next to each class to change its log level.
Optional: If a report is taking too long to execute, change the log level of the below classes to DEBUG to capture the SQL queries to run for reports as well as their timing:
- com.jaspersoft.commons.util.JSControlledJdbcQueryExecuter: Logs the amount of time it takes one of JRJdbcQueryExecuter's queries to return data to a report.
- com.jaspersoft.commons.semantic.dsimpl.JdbcBaseDataSet: Logs SQL queries generated from queries that use a Domain.
- net.sf.jasperreports.engine.query.JRJdbcQueryExecuter: Logs text and parameter values for queries run by this logger.
Changing the log level of the org.hibernate.SQL class to DEBUG will generate a large amount of logging that could negatively impact JasperReports Server's performance.
Further information on system logs and how to use them can be found on the Jaspersoft Community page.