Example usage for java.sql DriverManager getLogWriter

List of usage examples for java.sql DriverManager getLogWriter

Introduction

In this page you can find the example usage for java.sql DriverManager getLogWriter.

Prototype

public static java.io.PrintWriter getLogWriter() 

Source Link

Document

Retrieves the log writer.

Usage

From source file:Logger.java

/**
 * Retrieve the active status of the logger.
 *
 * @return <code>boolean</code> true if logging enabled
 */// w  ww  . j  ava 2s  .  c  o  m
public static boolean isActive() {
    return (log != null || DriverManager.getLogWriter() != null);
}

From source file:OracleDataSource.java

public PrintWriter getLogWriter() throws SQLException {
    return DriverManager.getLogWriter();
}

From source file:Logger.java

/**
 * Print an Exception stack trace to the log.
 *
 * @param e the exception to log/*from  w  w  w  .ja va  2 s.  c  o m*/
 */
public static void logException(Exception e) {
    if (log != null) {
        e.printStackTrace(log);
    } else if (DriverManager.getLogWriter() != null) {
        e.printStackTrace(DriverManager.getLogWriter());
    }
}

From source file:com.adaptris.jdbc.connection.FailoverDataSource.java

/**
 * @see javax.sql.DataSource#getLogWriter()
 *//*w ww  .j a va2s.co  m*/
@Override
public PrintWriter getLogWriter() throws SQLException {
    return DriverManager.getLogWriter();
}

From source file:org.apache.cayenne.datasource.DriverDataSource.java

@Override
public PrintWriter getLogWriter() throws SQLException {
    return DriverManager.getLogWriter();
}

From source file:org.executequery.datasource.SimpleDataSource.java

public PrintWriter getLogWriter() throws SQLException {

    return DriverManager.getLogWriter();
}