view SQL executed by Jasper report

后端 未结 4 2203
自闭症患者
自闭症患者 2021-02-08 23:50

When running a Jasper report in which the SQL is embedded in the report file (.jrxml), is it possible to see the SQL that is executed? Ideally, I\'d also like to see the values

4条回答
  •  栀梦
    栀梦 (楼主)
    2021-02-09 00:15

    JasperReports uses the Jakarta Commons Logging API. Commons Logging has a discovery mechanism that connects to logging API you are using in your project.

    You need to configure logger named "net.sf.jasperreports" in your logging configuration file to control the logging level of JasperReports.

    If you are using Log4j, you can read this section of there documentation for exact details.

    For example you may write something like this in log4j.properties file

    log4j.logger.net.sf.jasperreports=INFO, Daily

    Where "Daily" is name of an appender configured in same properties file.

提交回复
热议问题