diff --git a/src/main/java/com/microsoft/sqlserver/jdbc/SQLServerDataSource.java b/src/main/java/com/microsoft/sqlserver/jdbc/SQLServerDataSource.java index fe79e79c2..16bae5861 100644 --- a/src/main/java/com/microsoft/sqlserver/jdbc/SQLServerDataSource.java +++ b/src/main/java/com/microsoft/sqlserver/jdbc/SQLServerDataSource.java @@ -34,7 +34,9 @@ public class SQLServerDataSource implements ISQLServerDataSource, DataSource, ja // dsLogger is logger used for all SQLServerDataSource instances. static final java.util.logging.Logger dsLogger = java.util.logging.Logger.getLogger("com.microsoft.sqlserver.jdbc.internals.SQLServerDataSource"); static final java.util.logging.Logger loggerExternal = - java.util.logging.Logger.getLogger("com.microsoft.sqlserver.jdbc.DataSource"); + java.util.logging.Logger.getLogger("com.microsoft.sqlserver.jdbc.DataSource"); + static final private java.util.logging.Logger parentLogger = + java.util.logging.Logger.getLogger("com.microsoft.sqlserver.jdbc"); final private String loggingClassName; private boolean trustStorePasswordStripped = false; private static final long serialVersionUID = 654861379544314296L; @@ -117,8 +119,7 @@ public Logger getParentLogger() throws SQLFeatureNotSupportedException { DriverJDBCVersion.checkSupportsJDBC41(); - // The driver currently does not implement JDDBC 4.1 APIs - throw new SQLFeatureNotSupportedException(SQLServerException.getErrString("R_notSupported")); + return parentLogger; } // Core Connection property setters/getters. diff --git a/src/main/java/com/microsoft/sqlserver/jdbc/SQLServerDriver.java b/src/main/java/com/microsoft/sqlserver/jdbc/SQLServerDriver.java index af2b7d771..05272f9cb 100644 --- a/src/main/java/com/microsoft/sqlserver/jdbc/SQLServerDriver.java +++ b/src/main/java/com/microsoft/sqlserver/jdbc/SQLServerDriver.java @@ -1024,6 +1024,8 @@ final public String toString() } static final private java.util.logging.Logger loggerExternal = java.util.logging.Logger.getLogger("com.microsoft.sqlserver.jdbc.Driver"); + static final private java.util.logging.Logger parentLogger = + java.util.logging.Logger.getLogger("com.microsoft.sqlserver.jdbc"); final private String loggingClassName; String getClassNameLogging() { @@ -1278,8 +1280,7 @@ public int getMinorVersion() public Logger getParentLogger() throws SQLFeatureNotSupportedException{ DriverJDBCVersion.checkSupportsJDBC41(); - // The driver currently does not implement JDDBC 4.1 APIs - throw new SQLFeatureNotSupportedException(SQLServerException.getErrString("R_notSupported")); + return parentLogger; } /*L0*/ public boolean jdbcCompliant() {