Loggers and logging levels
- Last Updated: October 2, 2020
- 1 minute read
- DataDirect Connectors
- ODBC
- Aha! 8.0
- Amazon Redshift 8.0
- Apache Cassandra 8.0
- Apache Hive 8.0
- Apache Spark SQL 8.0
- Autonomous Rest Connector 8.0
- Cloudera Impala 7.1
- dBase 7.1
- + 24
The Java Logging API is used to configure and control the loggers used by the driver. The Java Logging API is built into the JVM.
The Java Logging API allows applications or components to define one or more named loggers. Messages written to the loggers can be given different levels of importance. For example, warnings that occur in the driver can be written to a logger at the WARNING level, while progress or flow information can be written to a logger at the INFO or FINER level. Each logger used by the driver can be configured independently. The configuration for a logger includes what level of log messages are written, the location to which they are written, and the format of the log message.
The Java Logging API defines the following levels:
- SEVERE
- CONFIG
- FINE
- FINER
- FINEST
- INFO
- WARNING
Setting the log threshold of a logger to a particular level causes the logger
to write log messages of that level and higher to the log. For example, if the threshold is
set to FINE, the logger writes messages of levels FINE,
CONFIG, and SEVERE to its log. Messages of level FINER or FINEST are not written to the
log.
The driver exposes loggers for the following functional areas:
- Driver to SQL Communication
- SQL Engine
- Web service adapter