src/main/java/org/embulk/output/SQLServerOutputPlugin.java in embulk-output-sqlserver-0.7.13 vs src/main/java/org/embulk/output/SQLServerOutputPlugin.java in embulk-output-sqlserver-0.8.0
- old
+ new
@@ -163,11 +163,11 @@
useJtdsDriver = true;
}
}
UrlAndProperties urlProps = getUrlAndProperties(sqlServerTask, useJtdsDriver);
- logger.info("Connecting to {} options {}", urlProps.getUrl(), getPropsWithMaskedSecret(urlProps));
+ logConnectionProperties(urlProps.getUrl(), urlProps.getProps());
return new SQLServerOutputConnector(urlProps.getUrl(), urlProps.getProps(), sqlServerTask.getSchema().orNull());
}
private UrlAndProperties getUrlAndProperties(SQLServerPluginTask sqlServerTask, boolean useJtdsDriver)
{
@@ -283,21 +283,7 @@
@Override
protected ColumnSetterFactory newColumnSetterFactory(BatchInsert batch, DateTimeZone defaultTimeZone)
{
return new SQLServerColumnSetterFactory(batch, defaultTimeZone);
- }
-
- private Properties getPropsWithMaskedSecret(UrlAndProperties urlAndProperties)
- {
- Properties safeProps = new Properties();
- Properties originalProps = urlAndProperties.getProps();
- for(String key : originalProps.stringPropertyNames()) {
- if (key.equals("password")) {
- safeProps.setProperty(key, "***");
- } else {
- safeProps.setProperty(key, originalProps.getProperty(key));
- }
- }
- return safeProps;
}
}