Enabling Logging Statically in jConnect

Statically enable logging in jConnect that implements the standard Java logging mechanism.

  1. Use the text editor to modify the contents of the standard logging file in $JRE_DIR/lib/logging.properties.
    handlers= java.util.logging.FileHandler
    java.util.logging.FileHandler.formatter = com.sybase.jdbc4.utils.LogUtil
    .level= ALL
  2. Add or enter the following contents in the file:
    com.sybase.jdbc4.jdbc.SybDriver.level = FINEST
    com.sybase.jdbc4.jdbc.SybConnection.level = FINEST
    com.sybase.jdbc4.jdbc.SybStatement.level = FINER
    com.sybase.jdbc4.jdbc.SybPreparedStatement.level = FINE
    com.sybase.jdbc4.jdbc.SybResultSet.level = FINE
  3. Adjust the level of logging to Level.FINE, Level.FINER, and Level.FINEST to set the appropriate granularity of logging.
    Note: jConnect does not support package-level logging.
  4. Save the logging.properties file.