I figured out how to turn on the JDBC logging through code, but it is not in
the code our customers are running, and I would like to turn on the JDBC
driver logging only with a configuration file. Is this possible? I'm trying
a logging.properties file in the same directory as the driver containing
# Specify the handlers to create in the root logger
# (all loggers are children of the root logger).
# The following creates two handlers.
handlers = java.util.logging.ConsoleHandler, java.util.logging.FileHandler
# Set the default logging level for the root logger.
.level = OFF
# Set the default logging level for new ConsoleHandler instances.
java.util.logging.ConsoleHandler.level = FINE
# Set the default logging level for new FileHandler instances.
java.util.logging.FileHandler.level = OFF
# Set the default formatter for new ConsoleHandler instances.
java.util.logging.ConsoleHandler.formatter =
java.util.logging.SimpleFormatter
# Set the default logging level for the logger named ConnectionPool.
ConnectionPool.level = OFF
# default file output is in user's home directory.
java.util.logging.FileHandler.pattern = %h/java%u.log
java.util.logging.FileHandler.limit = 50000
java.util.logging.FileHandler.count = 1
java.util.logging.FileHandler.formatter = java.util.logging.XMLFormatter
############################################################
# Facility specific properties.
# Provides extra control for each logger.
############################################################
# For example, set the com.xyz.foo logger to only log SEVERE
# messages:
com.microsoft.sqlserver.jdbc.level = ALL
I haven't got any output yet. I'm kind of desparate, so any help would be
greatly apprceciated.
>> Stay informed about: Configuring Logging