log4j.logger.java.sql.PreparedStatement=debug
log4j.logger.java.sql.Connection=debug
将打印出Connection和Statement信息:
[DEBUG] 11:48:17 Connection - {conn-100000} Connection
[DEBUG] 11:48:17 Connection - {conn-100000} Preparing Statement: select api.id from t_api_metadata_api api, t_api_metadata_module module where api.module_id=module.id and api.source = ? and api.name = ? and api.module_id = ? and module.name = ?
[DEBUG] 11:48:17 PreparedStatement - {pstm-100001} Executing Statement: select api.id from t_api_metadata_api api, t_api_metadata_module module where api.module_id=module.id and api.source = ? and api.name = ? and api.module_id = ? and module.name = ?
[DEBUG] 11:48:17 PreparedStatement - {pstm-100001} Parameters: [wanggou, PdfTransform, 41, null]
[DEBUG] 11:48:17 PreparedStatement - {pstm-100001} Types: [java.lang.String, java.lang.String, java.lang.Integer, null]