Fix by Vanji for SYNAPSE-1058
git-svn-id: https://svn.apache.org/repos/asf/synapse/trunk@1769621 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/java/modules/transports/core/vfs/src/main/java/org/apache/synapse/transport/vfs/VFSTransportListener.java b/java/modules/transports/core/vfs/src/main/java/org/apache/synapse/transport/vfs/VFSTransportListener.java
index b340fa5..7306fd9 100644
--- a/java/modules/transports/core/vfs/src/main/java/org/apache/synapse/transport/vfs/VFSTransportListener.java
+++ b/java/modules/transports/core/vfs/src/main/java/org/apache/synapse/transport/vfs/VFSTransportListener.java
@@ -234,8 +234,8 @@
metrics.incrementMessagesReceived();
} catch (AxisFault e) {
- logException("Error processing File URI : "
- + fileObject.getName(), e);
+ logException("Error processing File URI : " +
+ VFSUtils.maskURLPassword(fileObject.getName().getURI()), e);
entry.setLastPollState(PollTableEntry.FAILED);
metrics.incrementFaultsReceiving();
}
@@ -259,8 +259,8 @@
}
}
} else if (log.isDebugEnabled()) {
- log.debug("Couldn't get the lock for processing the file : "
- + fileObject.getName());
+ log.debug("Couldn't get the lock for processing the file : " +
+ VFSUtils.maskURLPassword(fileObject.getName().getURI()));
} else if (isFailedRecord) {
if (entry.isFileLockingEnabled()) {
VFSUtils.releaseLock(fsManager, fileObject);
@@ -313,7 +313,8 @@
metrics.incrementMessagesReceived();
} catch (Exception e) {
- logException("Error processing File URI : " + child.getName(), e);
+ logException("Error processing File URI : " +
+ VFSUtils.maskURLPassword(child.getName().getURI()), e);
failCount++;
// tell moveOrDeleteAfterProcessing() file failed
entry.setLastPollState(PollTableEntry.FAILED);
@@ -424,7 +425,7 @@
FileObject dest = moveToDirectory.resolveFile(
prefix + fileObject.getName().getBaseName());
if (log.isDebugEnabled()) {
- log.debug("Moving to file :" + dest.getName().getURI());
+ log.debug("Moving to file :" + VFSUtils.maskURLPassword(dest.getName().getURI()));
}
try {
fileObject.moveTo(dest);
@@ -713,7 +714,7 @@
FileObject dest = moveToDirectory.resolveFile(
prefix + fileObject.getName().getBaseName());
if (log.isDebugEnabled()) {
- log.debug("The failed file is moving to :" + dest.getName().getURI());
+ log.debug("The failed file is moving to :" + VFSUtils.maskURLPassword(dest.getName().getURI()));
}
try {
fileObject.moveTo(dest);
diff --git a/java/modules/transports/core/vfs/src/main/java/org/apache/synapse/transport/vfs/VFSTransportSender.java b/java/modules/transports/core/vfs/src/main/java/org/apache/synapse/transport/vfs/VFSTransportSender.java
index fad84fd..993bb7f 100644
--- a/java/modules/transports/core/vfs/src/main/java/org/apache/synapse/transport/vfs/VFSTransportSender.java
+++ b/java/modules/transports/core/vfs/src/main/java/org/apache/synapse/transport/vfs/VFSTransportSender.java
@@ -272,13 +272,15 @@
VFSUtils.releaseLock(fsManager, responseFile);
}
metrics.incrementFaultsSending();
- handleException("IO Error while creating response file : " + responseFile.getName(), e);
+ handleException("IO Error while creating response file : " +
+ VFSUtils.maskURLPassword(responseFile.getName().getURI()), e);
} catch (IOException e) {
if (lockingEnabled) {
VFSUtils.releaseLock(fsManager, responseFile);
}
metrics.incrementFaultsSending();
- handleException("IO Error while creating response file : " + responseFile.getName(), e);
+ handleException("IO Error while creating response file : " +
+ VFSUtils.maskURLPassword(responseFile.getName().getURI()), e);
}
}
@@ -289,9 +291,9 @@
// wait till we get the lock
while (!VFSUtils.acquireLock(fsManager, responseFile)) {
if (vfsOutInfo.getMaxRetryCount() == tryNum++) {
- handleException("Couldn't send the message to file : "
- + responseFile.getName() + ", unable to acquire the " +
- "lock even after " + tryNum + " retries");
+ handleException("Couldn't send the message to file : " +
+ VFSUtils.maskURLPassword(responseFile.getName().getURI()) +
+ ", unable to acquire the lock even after " + tryNum + " retries");
} else {
log.warn("Couldn't get the lock for the file : "