Dynamic Monitoring of JDBC database access operations-Log4JDBC and jdbclog4jdbc
Log4jdbc is a JDBC drive that records SQL logs, SQL Execution time, and other information. Log4jdbc uses SLF4J (Simple Logging Facade) as the log system.
Features:
1. JDBC3 and JDBC4 are supported.
2. supports most of the existing JDBC drivers.
3. easy configuration (in most cases, you only need to change the Driver Class Name and add & rdquo; jdbc: log4 & ldquo; Before the jdbc url to set the log output level ).
4. the SQL variable value can be automatically added to the SQL output log to improve ease of debugging and facilitate debugging.
5. Quickly identifies slow SQL statements executed in the application.
6. the SQL connection count information can be generated to help identify connection pool/thread problems.
Tested to be more concise and compatible than the p6spy http://www.cnblogs.com/2018/p/4711256.html
Log4jdbc records the SQL Execution time, execution parameters, and execution time. This is very helpful for finding SQL errors during development.