Package org.apache.openjpa.lib.jdbc
Class DataSourceLogs
java.lang.Object
org.apache.openjpa.lib.jdbc.DataSourceLogs
Provies basic logging facilities to a DataSource.
- Author:
- Marc Prud'hommeaux
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionThe log to write JDBC messages to.The log to write SQL messages to.boolean
Return true if JDBC logging is enabled.boolean
Return true if SQL logging is enabled.void
logJDBC
(String msg, long startTime, Connection conn) Log a JDBC message on behalf of the given connection.void
logJDBC
(String msg, Connection conn) Log a JDBC message on behalf of the given connection.void
logSQL
(String msg, long startTime, Connection conn) Log a SQL message on behalf of the given connection.void
logSQL
(String msg, Connection conn) Log a SQL message on behalf of the given connection.void
setJDBCLog
(Log log) The log to write JDBC messages to.void
The log to write SQL messages to.
-
Constructor Details
-
DataSourceLogs
public DataSourceLogs()
-
-
Method Details
-
getJDBCLog
The log to write JDBC messages to. -
setJDBCLog
The log to write JDBC messages to. -
isJDBCEnabled
public boolean isJDBCEnabled()Return true if JDBC logging is enabled. -
getSQLLog
The log to write SQL messages to. -
setSQLLog
The log to write SQL messages to. -
isSQLEnabled
public boolean isSQLEnabled()Return true if SQL logging is enabled. -
logJDBC
Log a JDBC message on behalf of the given connection. -
logJDBC
Log a JDBC message on behalf of the given connection. -
logSQL
Log a SQL message on behalf of the given connection. -
logSQL
Log a SQL message on behalf of the given connection.
-