Package org.apache.openjpa.lib.jdbc
Class DataSourceLogs
- java.lang.Object
-
- org.apache.openjpa.lib.jdbc.DataSourceLogs
-
public class DataSourceLogs extends java.lang.ObjectProvies basic logging facilities to a DataSource.- Author:
- Marc Prud'hommeaux
-
-
Constructor Summary
Constructors Constructor Description DataSourceLogs()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LoggetJDBCLog()The log to write JDBC messages to.LoggetSQLLog()The log to write SQL messages to.booleanisJDBCEnabled()Return true if JDBC logging is enabled.booleanisSQLEnabled()Return true if SQL logging is enabled.voidlogJDBC(java.lang.String msg, long startTime, java.sql.Connection conn)Log a JDBC message on behalf of the given connection.voidlogJDBC(java.lang.String msg, java.sql.Connection conn)Log a JDBC message on behalf of the given connection.voidlogSQL(java.lang.String msg, long startTime, java.sql.Connection conn)Log a SQL message on behalf of the given connection.voidlogSQL(java.lang.String msg, java.sql.Connection conn)Log a SQL message on behalf of the given connection.voidsetJDBCLog(Log log)The log to write JDBC messages to.voidsetSQLLog(Log log)The log to write SQL messages to.
-
-
-
Method Detail
-
getJDBCLog
public Log getJDBCLog()
The log to write JDBC messages to.
-
setJDBCLog
public void setJDBCLog(Log log)
The log to write JDBC messages to.
-
isJDBCEnabled
public boolean isJDBCEnabled()
Return true if JDBC logging is enabled.
-
getSQLLog
public Log getSQLLog()
The log to write SQL messages to.
-
setSQLLog
public void setSQLLog(Log log)
The log to write SQL messages to.
-
isSQLEnabled
public boolean isSQLEnabled()
Return true if SQL logging is enabled.
-
logJDBC
public void logJDBC(java.lang.String msg, java.sql.Connection conn)Log a JDBC message on behalf of the given connection.
-
logJDBC
public void logJDBC(java.lang.String msg, long startTime, java.sql.Connection conn)Log a JDBC message on behalf of the given connection.
-
logSQL
public void logSQL(java.lang.String msg, java.sql.Connection conn)Log a SQL message on behalf of the given connection.
-
logSQL
public void logSQL(java.lang.String msg, long startTime, java.sql.Connection conn)Log a SQL message on behalf of the given connection.
-
-