From 93d25ed78c5afe3080aef05bd5b1fa41abb593ab Mon Sep 17 00:00:00 2001 From: Jan Blom Date: Tue, 1 Nov 2022 15:42:34 +0100 Subject: [PATCH] Add log line in console when system property 'jdbc.drivers' has non-empty value --- rabbit-core/src/main/java/org/ohdsi/databases/DBConnector.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rabbit-core/src/main/java/org/ohdsi/databases/DBConnector.java b/rabbit-core/src/main/java/org/ohdsi/databases/DBConnector.java index af26acb0..7b0a2b61 100644 --- a/rabbit-core/src/main/java/org/ohdsi/databases/DBConnector.java +++ b/rabbit-core/src/main/java/org/ohdsi/databases/DBConnector.java @@ -33,6 +33,9 @@ public static void main(String[] args) { // If dbType.BIGQUERY: domain field has been replaced with database field public static Connection connect(String server, String domain, String user, String password, DbType dbType) { + if (System.getProperty("jdbc.drivers") != null && !System.getProperty("jdbc.drivers").equals("")) { + System.out.println("The following jdbc drivers will be loaded because they are set in system property 'jdbc.drivers': '" + System.getProperty("jdbc.drivers") + "'"); + } if (dbType.equals(DbType.MYSQL)) return DBConnector.connectToMySQL(server, user, password); else if (dbType.equals(DbType.MSSQL) || dbType.equals(DbType.PDW) || dbType.equals(DbType.AZURE))