Skip to content

Commit

Permalink
Merge pull request #12 from embulk/mask-password-in-log
Browse files Browse the repository at this point in the history
Mask password in the log
  • Loading branch information
sakama authored Aug 18, 2016
2 parents a81564c + 646bba8 commit f3842fb
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/main/java/org/embulk/input/sftp/FileList.java
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,6 @@ public synchronized boolean add(String path, long size)

int index = entries.size();
entries.add(new Entry(index, size));
log.info("add file to the request list: {}", path);

byte[] data = path.getBytes(StandardCharsets.UTF_8);
castBuffer.putInt(0, data.length);
Expand Down
5 changes: 4 additions & 1 deletion src/main/java/org/embulk/input/sftp/SftpFileInput.java
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ public static FileSystemOptions initializeFsOptions(PluginTask task)
if (proxy.getHost().isPresent()) {
builder.setProxyHost(fsOptions, proxy.getHost().get());
builder.setProxyPort(fsOptions, proxy.getPort());
log.info("Using proxy {}:{} proxy_type:{}", proxy.getHost().get(), proxy.getPort(), proxy.getType().toString());
}

if (proxy.getUser().isPresent()) {
Expand All @@ -132,7 +133,9 @@ public static FileSystemOptions initializeFsOptions(PluginTask task)
public static String getSftpFileUri(PluginTask task, String path)
{
try {
return new URI("sftp", initializeUserInfo(task), task.getHost(), task.getPort(), path, null, null).toString();
String uri = new URI("sftp", initializeUserInfo(task), task.getHost(), task.getPort(), path, null, null).toString();
log.info("Connecting to sftp://{}:***@{}:{}/", task.getUser(), task.getHost(), task.getPort());
return uri;
}
catch (URISyntaxException ex) {
throw new ConfigException(ex);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ public InputStream openNext() throws IOException
@Override
public InputStream call() throws FileSystemException
{
log.info("Starting to download file {}", key);
FileObject file = manager.resolveFile(key, fsOptions);
return file.getContent().getInputStream();
}
Expand Down

0 comments on commit f3842fb

Please sign in to comment.