Registry / logging / p6spy
library3.9.1javamavenunverified

P6Spy is a framework that intercepts and logs database SQL statements for performance monitoring and debugging.

<dependency> <groupId>p6spy</groupId> <artifactId>p6spy</artifactId> <version>3.9.1</version> </dependency>
INSTALL
IMPORT
SIG · P6SPY
P
p6spy
loggingjavav3.9.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

P6SpyDriver
com.p6spy.engine.spy.P6SpyDriver

Connects to a MySQL database using P6Spy driver for SQL logging.

import com.p6spy.engine.spy.P6SpyDriver; import java.sql.Connection; import java.sql.DriverManager; public class P6SpyExample { public static void main(String[] args) throws Exception { Class.forName("com.p6spy.engine.spy.P6SpyDriver"); Connection conn = DriverManager.getConnection("jdbc:p6spy:mysql://localhost:3306/mydb", "user", "pass"); System.out.println("Connected with P6Spy"); } }
Debug
Known issues
gotchaP6Spy requires a spy.properties configuration file to be on the classpath.
fix
Create a spy.properties file with appropriate logging settings.
affects: all
Upgrade
Version history
3.9.1latest on Maven
Audit
Dependencies

No dependency data recorded yet.

Agent activity
21 hits · last 30 days
node
18
Amazon
1
Resources
p6spy — mvn dependency:get p6spy · libregistry