Issue
The Java Database Connectivity (JDBC) API is the industry standard for database-independent connectivity between the Java programming language and a wide range of databases and other tabular data sources, such as spreadsheets or flat files.
This article describes how to enable JDBC additional logging for debug purposes.
Environment
-
CloudBees CD (CloudBees Flow) in all versions.
== Resolution
-
In the CloudBees CD Server, Open the
logback-local.groovy file
, which is located inyourInstallationPath/conf
, and find the following section:// Log all SQL DML statements as they are executed logger("org.hibernate.SQL", TRACE) // Log all JDBC parameters logger("org.hibernate.type.descriptor.sql.BasicBinder", TRACE)
-
Ensure that the lines are uncommented and that the level is set to "TRACE".
-
Once saved this file, please confirm the additional logging lines are added to the
yourInstallationPath/logs/commander.log
file (in clustered installations the log is generated in the filecommander-yourHostName.log
) by running:// Log all SQL DML statements as they are executed logger("org.hibernate.SQL", TRACE) --> Validate grep " SQL " commander.log | wc -l is > 0 // Log all JDBC parameters logger("org.hibernate.type.descriptor.sql.BasicBinder", TRACE) --> Validate grep " BasicBinder " commander.log | wc -l is > 0
-
If this change does not take effect (previous grep commands return 0), restart the CloudBees CD (CloudBees Flow) server and check with the grep commands again after restarting (this might be required for very busy servers).
-
Reproduce the issue that you are trying to debug.
-
Provide to the support team all the logs from the time you turned on SQL logging until after the issue is reproduced.
-