public class ReportJdbcConnection extends Object implements Runnable
Connection, such as catalog, schema, metadata, properties,
transaction settings, client info, and optionally the type map.
This class logs information using a SLF4J Logger, formatting it to resemble a structured diagnostic output.
It is useful for debugging or documenting the JDBC environment at runtime.
Typical usage:
JdbcConnectionReporter reporter = new JdbcConnectionReporter(logger)
.printTypeMap(true);
reporter.run(connection);
| Constructor and Description |
|---|
ReportJdbcConnection() |
| Modifier and Type | Method and Description |
|---|---|
ReportJdbcConnection |
printTypeMap(boolean printTypeMap)
Defines whether the JDBC type map should be printed.
|
void |
run()
Executes the report for the specified JDBC
Connection. |
public ReportJdbcConnection printTypeMap(boolean printTypeMap)
printTypeMap - true to print the type map; false to skip itpublic void run()
Connection.
This method logs the output using LoggerFactory.getInfoPrintStream(Logger).
If the connection is closed, it logs a message and exits early.
Copyright © 2010–2025. All rights reserved.