org.apache.openjpa.lib.jdbc
Class DataSourceLogs

java.lang.Object
  extended by org.apache.openjpa.lib.jdbc.DataSourceLogs

public class DataSourceLogs
extends Object

Provies basic logging facilities to a DataSource.

Author:
Marc Prud'hommeaux

Constructor Summary
DataSourceLogs()
           
DataSourceLogs(Log jdbcLog, Log sqlLog)
           
 
Method Summary
 Log getJDBCLog()
          The log to write JDBC messages to.
 Log getSQLLog()
          The log to write SQL messages to.
 boolean isJDBCEnabled()
          Return true if JDBC logging is enabled.
 boolean isSQLEnabled()
          Return true if SQL logging is enabled.
 void logJDBC(String msg, Connection conn)
          Log a JDBC message on behalf of the given connection.
 void logJDBC(String msg, long startTime, Connection conn)
          Log a JDBC message on behalf of the given connection.
 void logSQL(String msg, Connection conn)
          Log a SQL 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 setJDBCLog(Log log)
          The log to write JDBC messages to.
 void setSQLLog(Log log)
          The log to write SQL messages to.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataSourceLogs

public DataSourceLogs()

DataSourceLogs

public DataSourceLogs(Log jdbcLog,
                      Log sqlLog)
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(String msg,
                    Connection conn)
Log a JDBC message on behalf of the given connection.


logJDBC

public void logJDBC(String msg,
                    long startTime,
                    Connection conn)
Log a JDBC message on behalf of the given connection.


logSQL

public void logSQL(String msg,
                   Connection conn)
Log a SQL message on behalf of the given connection.


logSQL

public void logSQL(String msg,
                   long startTime,
                   Connection conn)
Log a SQL message on behalf of the given connection.



Copyright © 2006-2010 Apache Software Foundation. All Rights Reserved.