Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Excerpt

The database connector logging output is very helpful for troubleshooting database SQL issues. This example shows the log entry generated when browsing with an incorrect query name.

Code Block
2017-10-26 10:31:35.359 ERROR   12048 --- [http-nio-8082-exec-5] c.f.connectors.database.QueryResource    : Query BIRT/allcustomers not found
2017-10-26 10:31:35.372  INFO   12048 --- [http-nio-8082-exec-5] org.restlet.Component (1199403432)       : 2017-10-26    10:31:35    0:0:0:0:0:0:0:1    -    0:0:0:0:0:0:0:1    8082    GET    /database/BIRT/allcustomers    -    

The database connector logs version information for each datasource definition as it makes initial contact with your database(s).

Code Block
2017-09-15 15:50:01.554  INFO   28614 --- [ost-startStop-1] c.f.c.d.service.ConfigurationService     : DriverName: Microsoft JDBC Driver 6.3 for SQL Server
2017-09-15 15:50:01.554  INFO   28614 --- [ost-startStop-1] c.f.c.d.service.ConfigurationService     : DriverVersion: 6.3.1.0
2017-09-15 15:50:01.554  INFO   28614 --- [ost-startStop-1] c.f.c.d.service.ConfigurationService     : DriverMajorVersion: 6
2017-09-15 15:50:01.554  INFO   28614 --- [ost-startStop-1] c.f.c.d.service.ConfigurationService     : DriverMinorVersion: 3
2017-09-15 15:50:01.554  INFO   28614 --- [ost-startStop-1] c.f.c.d.service.ConfigurationService     : DatabaseProductName: Microsoft SQL Server
2017-09-15 15:50:01.554  INFO   28614 --- [ost-startStop-1] c.f.c.d.service.ConfigurationService     : DatabaseProductVersion: 14.00.900
2017-09-15 15:50:01.554  INFO   28614 --- [ost-startStop-1] c.f.c.d.service.ConfigurationService     : DatabaseMajorVersion: 14
2017-09-15 15:50:01.554  INFO   28614 --- [ost-startStop-1] c.f.c.d.service.ConfigurationService     : DatabaseMinorVersion: 0

To log the actual SQL statement, arguments, number or rows returned and success status, set logging level to INFO.

There are different logfiles for the Standalone and tomcat bundle installations.

Standalone mode

There are four logfiles in <db-home>\database\database-connector-2.5.x\logsThe Database Connector logfile is located in <frevvo-home>\tomcat\logs for the tomcat bundle and in <db-home>\database-connector-X.X.X\logs directory for the Standalone bundle. X.X.X is the version of the Database Connector. It is named database-connector.YYYY-MM-DD.log

In standalone mode, you will see three additional logfiles.

  1. DbConnector.err.log - currently empty.
  2. DbConnector.out.log - logs the database connector version.
  3. DbConnector.wrapper.log - empty unless the database connector is running as a servers. Logs starts/stops date/time

    .

    database-connector.YYYY-MM-DD.log - This is the main logfile all output.

Turning on DEBUG level logging

  1. Stop if you are using the tomcat bundle or the Database Connector service if you are using the Standalone database connectorbundle.
  2. Edit the:
    1. Standalone bundle - <db-home>\database-connector-DBC version number\config\dbconnector.properties file
    .
  3. Add the following line.

    Code Block
     logging.level.com.frevvo.connectors.database=DEBUG
  4. Restart the connector.
    1. Tomcat bundle
The database connector writes all output to a single logfile <frevvo-home>\tomcat\logs\database-connector.YYYY-MM
    1. -
DD.log
Turning on DEBUG level logging
  1. Stop . You do not have to stop the Insight Server.
  2. Edit the
    1. <frevvo-home>
    \
    1. /tomcat
    \conf\frevvo-config
    1. /conf/dbconnector.properties file.
  3. Add the following line.

    Code Block
     logging.level.com.frevvo.connectors.database=DEBUG
  4. Save the file
  5. Restart
Generate
  1. the
Database Connector log in JSON formatLogging output defaults to text format. To switch to JSON format, add thisproperty to the frevvo-config.properties for the frevvo-tomcat bundle or to dbconnector.properties file for the standalone bundle.
Code Block
spring.profiles.include=logging-json 

...

  1. Standalone Database Connector service or if you are using the tomcat bundle.

Common Problems

Some common issues with solutions are listed below.

Doc Post Failure

If a submission doesn't reach the Database Connector or when certain database operations fail,  will

...

Warning Message if Connection threshold is exceeded

A query or businessIf the time to connect to the Database Connector exceeds the default value of 2000 ms you will see a warning in the Database Connector log similar to the one shown below:

Code Block
2018-04-20 13:06:37.790  WARN mycompany c852c55e-d529-42b0-a7f2-a4bc8d370d95 2068 --- [http-nio-8082-exec-4] c.f.connector.database.QueryResource     : Database operation took 6962 ms exceeding the threshold  of 2000 ms 

You can override the default by adding the frevvo.connectors.database.configuration.connectionThresholdMillis with a value in ms to the <frevvo-home>\tomcat\conf\dbconnector.properties file (tomcat bundle) or the <database connector-home>\dbconnector-2.5.5.zip\database-connector-2.5.5\config\dbconnector.properties file.

Code Block
frevvo.connectors.database.configuration.connectionThresholdMillis=<value in ms>