EDB JDBC Connector logging v42.5.4.1
The EDB Postgres Advanced Server JDBC Connector supports the use of logging to help resolve issues with the JDBC Connector when used in your application. The JDBC Connector uses the logging APIs of java.util.logging
that was part of Java since JDK 1.4. For information on java.util.logging
, see The PostgreSQL JDBC Driver.
Note
Previous versions of the EDB Postgres Advanced Server JDBC Connector used a custom mechanism to enable logging. It's now replaced by the use of java.util.logging
in versions moving forward from community version 42.1.4.1. The older mechanism is no longer available.
Previous versions of the Advanced Server JDBC Connector can enable logging using the connection properties, however it is no longer available from 42.3.3 onwards.
Enabling logging with logging.properties
The default Java logging framework stores its configuration in a file called logging.properties
. You can use logging properties to configure the driver dynamically (for example, when using the JDBC Connector with an application server such as Tomcat, JBoss, WildFly, etc.), which makes it easier to enable/disable logging at runtime. The following example demonstrates configuring logging dynamically:
The default file output is in the user’s home directory:
Use the following command to set the logging level for the JDBC Connector to FINEST
(maps to loggerLevel
):
com.edb.level=FINEST
Then, execute the application with the logging configuration:
java –jar -Djava.util.logging.config.file=logging.properties run.jar
- On this page
- Enabling logging with logging.properties