diff --git a/modules/transports/core/vfs/src/main/java/org/apache/synapse/transport/vfs/PollTableEntry.java b/modules/transports/core/vfs/src/main/java/org/apache/synapse/transport/vfs/PollTableEntry.java index 84d8d110a8..8953838fa1 100644 --- a/modules/transports/core/vfs/src/main/java/org/apache/synapse/transport/vfs/PollTableEntry.java +++ b/modules/transports/core/vfs/src/main/java/org/apache/synapse/transport/vfs/PollTableEntry.java @@ -160,7 +160,7 @@ public String getFileURI() { } catch (UnknownHostException | FileSystemException e) { String message = "Unable to resolve the hostname of transport.vfs.FileURI : " + VFSUtils.maskURLPassword(fileURI); - VFSTransportErrorHandler.logException(log, LogType.WARN, message, e); + VFSTransportErrorHandler.logException(log, LogType.WARN, message, getServiceName(), e); } } return fileURI; @@ -173,7 +173,7 @@ public String getReplyFileURI() { } catch (UnknownHostException | FileSystemException e) { String message = "Unable to resolve the hostname of transport.vfs.ReplyFileURI : " + VFSUtils.maskURLPassword(replyFileURI); - VFSTransportErrorHandler.logException(log, LogType.WARN, message, e); + VFSTransportErrorHandler.logException(log, LogType.WARN, message, getServiceName(), e); } } return replyFileURI; @@ -210,7 +210,7 @@ public String getMoveAfterProcess() { } catch (UnknownHostException | FileSystemException e) { String message = "Unable to resolve the hostname of transport.vfs.MoveAfterProcess: " + VFSUtils.maskURLPassword(moveAfterProcess); - VFSTransportErrorHandler.logException(log, LogType.WARN, message, e); + VFSTransportErrorHandler.logException(log, LogType.WARN, message, getServiceName(), e); } } return moveAfterProcess; @@ -223,7 +223,7 @@ public String getMoveAfterMoveFailure() { } catch (UnknownHostException | FileSystemException e) { String message = "Unable to resolve the hostname of transport.vfs.MoveAfterFailedMove: " + VFSUtils.maskURLPassword(moveAfterMoveFailure); - VFSTransportErrorHandler.logException(log, LogType.WARN, message, e); + VFSTransportErrorHandler.logException(log, LogType.WARN, message, getServiceName(), e); } } return moveAfterMoveFailure; @@ -295,7 +295,7 @@ public String getMoveAfterFailure() { } catch (UnknownHostException | FileSystemException e) { String message = "Unable to resolve the hostname of transport.vfs.MoveAfterFailure: " + VFSUtils.maskURLPassword(moveAfterFailure); - VFSTransportErrorHandler.logException(log, LogType.WARN, message, e); + VFSTransportErrorHandler.logException(log, LogType.WARN, message, getServiceName(), e); } } return moveAfterFailure; @@ -509,7 +509,6 @@ public void setSubfolderTimestamp(String subfolderTimestamp) { @Override public boolean loadConfiguration(ParameterInclude params) throws AxisFault { - decryptParamsIfRequired(params); this.params = params; resolveHostsDynamically = ParamUtils.getOptionalParamBoolean(params, diff --git a/modules/transports/core/vfs/src/main/java/org/apache/synapse/transport/vfs/VFSTransportErrorHandler.java b/modules/transports/core/vfs/src/main/java/org/apache/synapse/transport/vfs/VFSTransportErrorHandler.java index 9008910e5e..7efc5ebfb8 100644 --- a/modules/transports/core/vfs/src/main/java/org/apache/synapse/transport/vfs/VFSTransportErrorHandler.java +++ b/modules/transports/core/vfs/src/main/java/org/apache/synapse/transport/vfs/VFSTransportErrorHandler.java @@ -54,6 +54,19 @@ public static void logException(Log log, LogType type, String message, Exception } } + /** + * This method is used to log exceptions with exception + * @param log Log + * @param type {@link LogType} + * @param message String message to be logged + * @param configName String name of the configuration + * @param e Exception + */ + public static void logException(Log log, LogType type, String message, String configName, Exception e) { + message = constructLogMessage(message, configName); + logException(log, type, message, e); + } + /** * This method is used to log exceptions without exception * @param log Log @@ -80,6 +93,18 @@ public static void logException(Log log, LogType type, String message) { } } + /** + * This method is used to log exceptions without exception + * @param log Log + * @param type {@link LogType} + * @param message String message to be logged + * @param configName String name of the configuration + */ + public static void logException(Log log, LogType type, String message, String configName) { + message = constructLogMessage(message, configName); + logException(log, type, message); + } + /** * This method is used to handle exceptions. Log error message and throws an AxisFault with the exception * @param log Log @@ -92,6 +117,19 @@ public static void handleException(Log log, String message, Exception e) throws throw new AxisFault(message, e); } + /** + * This method is used to handle exceptions. Log error message and throws an AxisFault with the exception + * @param log Log + * @param message String message to be logged + * @param configName String name of the configuration + * @param e Exception + * @throws AxisFault + */ + public static void handleException(Log log, String message, String configName, Exception e) throws AxisFault { + logException(log, LogType.ERROR, message, configName, e); + throw new AxisFault(message, e); + } + /** * This method is used to handle exceptions. Log error message and throws an AxisFault * @param log Log @@ -103,6 +141,18 @@ public static void handleException(Log log, String message) throws AxisFault { throw new AxisFault(message); } + /** + * This method is used to handle exceptions. Log error message and throws an AxisFault + * @param log Log + * @param message String message to be logged + * @param configName String name of the configuration + * @throws AxisFault + */ + public static void handleException(Log log, String message, String configName) throws AxisFault { + logException(log, LogType.ERROR, message, configName); + throw new AxisFault(message); + } + /** * This method is used to handle print the stack trace * @param e InterruptedException @@ -129,4 +179,17 @@ public enum LogType { ERROR, FATAL } + + /** + * This method is used to construct the log message + * @param message String message to be logged + * @param configName String name of the configuration + * @return String constructed log message + */ + public static String constructLogMessage(String message, String configName) { + if (null == configName || configName.trim().isEmpty()) { + return message; + } + return "[Service: ".concat(configName).concat("] - ").concat(message); + } } diff --git a/modules/transports/core/vfs/src/main/java/org/apache/synapse/transport/vfs/VFSTransportListener.java b/modules/transports/core/vfs/src/main/java/org/apache/synapse/transport/vfs/VFSTransportListener.java index 5e9e6836d7..74c9b2cc27 100644 --- a/modules/transports/core/vfs/src/main/java/org/apache/synapse/transport/vfs/VFSTransportListener.java +++ b/modules/transports/core/vfs/src/main/java/org/apache/synapse/transport/vfs/VFSTransportListener.java @@ -196,6 +196,7 @@ protected void poll(PollTableEntry entry) { * @param fileURI the file or directory to be scanned */ protected void scanFileOrDirectory(final PollTableEntry entry, String fileURI) { + String serviceName = entry.getServiceName(); if (log.isDebugEnabled()) { log.debug("Polling: " + VFSUtils.maskURLPassword(fileURI)); } @@ -225,7 +226,7 @@ protected void scanFileOrDirectory(final PollTableEntry entry, String fileURI) { fso = VFSUtils.attachFileSystemOptions(entry.getVfsSchemeProperties(), getFsManager()); } catch (Exception e) { VFSTransportErrorHandler.logException(log, LogType.ERROR, - "Error while attaching VFS file system properties. ", e); + "Error while attaching VFS file system properties. ", serviceName, e); } FileObject fileObject = null; @@ -268,10 +269,11 @@ protected void scanFileOrDirectory(final PollTableEntry entry, String fileURI) { VFSUtils.maskURLPassword(fileURI) + ", in attempt " + retryCount + ", " + e.getMessage() + " Retrying in " + reconnectionTimeout + " milliseconds."; - VFSTransportErrorHandler.logException(log, LogType.WARN, message); + VFSTransportErrorHandler.logException(log, LogType.WARN, message, serviceName); } } catch (Exception e) { - VFSTransportErrorHandler.logException(log, LogType.WARN, "Runtime error may have occurred. ", e); + VFSTransportErrorHandler.logException(log, LogType.WARN, "Runtime error may have occurred. ", + serviceName, e); closeCachedFileSystem(fileURI, fso); } @@ -281,7 +283,7 @@ protected void scanFileOrDirectory(final PollTableEntry entry, String fileURI) { } catch (InterruptedException e2) { Thread.currentThread().interrupt(); VFSTransportErrorHandler.logException(log, LogType.ERROR, - "Thread was interrupted while waiting to reconnect.", e2); + "Thread was interrupted while waiting to reconnect.", serviceName, e2); } } } @@ -297,7 +299,7 @@ protected void scanFileOrDirectory(final PollTableEntry entry, String fileURI) { } catch (FileNotFolderException ignored) { } catch (FileSystemException ex) { closeFileSystem(fileObject); - VFSTransportErrorHandler.logException(log, LogType.ERROR, ex.getMessage(), ex); + VFSTransportErrorHandler.logException(log, LogType.ERROR, ex.getMessage(), serviceName, ex); } // if this is a file that would translate to a single message @@ -330,12 +332,12 @@ protected void scanFileOrDirectory(final PollTableEntry entry, String fileURI) { String message = "Error processing File URI : " + VFSUtils.maskURLPassword(fileObject.getName().toString()) + ". This can be due to file moved from another process."; - VFSTransportErrorHandler.logException(log, LogType.WARN, message); + VFSTransportErrorHandler.logException(log, LogType.WARN, message, serviceName); runPostProcess = false; } else { String message = "Error processing File URI : " + VFSUtils.maskURLPassword(fileObject.getName().getURI()); - VFSTransportErrorHandler.logException(log, LogType.ERROR, message, e); + VFSTransportErrorHandler.logException(log, LogType.ERROR, message, serviceName, e); entry.setLastPollState(PollTableEntry.FAILED); metrics.incrementFaultsReceiving(); } @@ -348,7 +350,8 @@ protected void scanFileOrDirectory(final PollTableEntry entry, String fileURI) { String message = "File object '" + VFSUtils.maskURLPassword(fileObject.getURL().toString()) + "' " + "cloud not be moved"; - VFSTransportErrorHandler.logException(log, LogType.ERROR, message, axisFault); + VFSTransportErrorHandler.logException(log, LogType.ERROR, message, serviceName, + axisFault); entry.setLastPollState(PollTableEntry.FAILED); String timeStamp = VFSUtils.getSystemTime(entry.getFailedRecordTimestampFormat()); addFailedRecord(entry, fileObject, timeStamp); @@ -671,6 +674,7 @@ protected boolean acquireLock(FileSystemManager fsManager, FileObject fileObject protected void moveOrDeleteAfterProcessing(final PollTableEntry entry, FileObject fileObject, FileSystemOptions fso) throws AxisFault { + String serviceName = entry.getServiceName(); String moveToDirectoryURI = null; try { switch (entry.getLastPollState()) { @@ -721,7 +725,7 @@ protected void moveOrDeleteAfterProcessing(final PollTableEntry entry, FileObjec VFSUtils.parseSchemeFileOptions(moveToDirectoryURI, entry.getParams()), getFsManager()); } catch (Exception e) { VFSTransportErrorHandler.logException(log, LogType.WARN, - "Unable to set options for processed file location ", e); + "Unable to set options for processed file location ", serviceName, e); } FileObject moveToDirectory = getFsManager().resolveFile(moveToDirectoryURI, destinationFSO); String prefix; @@ -749,7 +753,7 @@ protected void moveOrDeleteAfterProcessing(final PollTableEntry entry, FileObjec closeFileSystem(fileObject); String message = "Error moving file : " + VFSUtils.maskURLPassword(fileObject.toString()) + " to " + VFSUtils.maskURLPassword(moveToDirectoryURI); - VFSTransportErrorHandler.handleException(log, message, e); + VFSTransportErrorHandler.handleException(log, message, serviceName, e); }finally{ try { fileObject.close(); @@ -767,12 +771,13 @@ protected void moveOrDeleteAfterProcessing(final PollTableEntry entry, FileObjec if (!fileObject.delete()) { String msg = "Cannot delete file : " + VFSUtils.maskURLPassword(fileObject.toString()); - VFSTransportErrorHandler.handleException(log, msg); + VFSTransportErrorHandler.handleException(log, msg, serviceName); } } catch (FileSystemException e) { closeFileSystem(fileObject); - log.error("Error deleting file : " - + VFSUtils.maskURLPassword(fileObject.toString()), e); + String msg = "Error deleting file : " + + VFSUtils.maskURLPassword(fileObject.toString()); + VFSTransportErrorHandler.handleException(log, msg, serviceName, e); } } @@ -985,6 +990,7 @@ private Properties generateSecureVaultProperties(TransportInDescription inDescri protected synchronized void addFailedRecord(PollTableEntry pollTableEntry, FileObject failedObject, String timeString) { + String serviceName = pollTableEntry.getServiceName(); try { String record = failedObject.getName().getBaseName() + VFSConstants.FAILED_RECORD_DELIMITER + timeString; @@ -1007,7 +1013,8 @@ protected synchronized void addFailedRecord(PollTableEntry pollTableEntry, FileUtils.writeLines(failedRecordFile, content); } } catch (IOException e) { - VFSTransportErrorHandler.logException(log, LogType.FATAL, "Failure while writing the failed records!", e); + VFSTransportErrorHandler.logException(log, LogType.FATAL, + "Failure while writing the failed records!", serviceName, e); } } @@ -1070,6 +1077,7 @@ public void run() { boolean isDeletionSucceed = false; int nextRetryDuration = pollTableEntry.getNextRetryDuration(); int count = 0; + String serviceName = pollTableEntry.getServiceName(); while (!isDeletionSucceed) { try { reTryFailedMove(pollTableEntry, failedFileObject, fileSystemOptions); @@ -1082,11 +1090,11 @@ public void run() { + VFSUtils.maskURLPassword(failedFileObject.getURL().toString()) + "', next re-try will be " +"after '" + nextRetryDuration + "' milliseconds"; - VFSTransportErrorHandler.logException(log, LogType.ERROR, message); + VFSTransportErrorHandler.logException(log, LogType.ERROR, message, serviceName); } catch (FileSystemException e) { String message = "Error while retrying the file url of the file object '" + VFSUtils.maskURLPassword(failedFileObject.toString()) + "'"; - VFSTransportErrorHandler.logException(log, LogType.ERROR, message); + VFSTransportErrorHandler.logException(log, LogType.ERROR, message, serviceName); } try { Thread.sleep(nextRetryDuration); @@ -1099,6 +1107,7 @@ public void run() { private synchronized void reTryFailedMove(PollTableEntry entry, FileObject fileObject, FileSystemOptions fso) throws AxisFault { + String serviceName = entry.getServiceName(); try { String moveToDirectoryURI = entry.getMoveAfterMoveFailure(); @@ -1124,14 +1133,14 @@ private synchronized void reTryFailedMove(PollTableEntry entry, FileObject fileO closeFileSystem(fileObject); String message = "Error moving the failed file : " + VFSUtils.maskURLPassword(fileObject.toString()) + " to " + moveToDirectoryURI; - VFSTransportErrorHandler.handleException(log, message, e); + VFSTransportErrorHandler.handleException(log, message, serviceName, e); } } catch (FileSystemException e) { String message = "Cloud not move the failed file object '" + VFSUtils.maskURLPassword(fileObject.toString()) + "'"; - VFSTransportErrorHandler.handleException(log, message, e); + VFSTransportErrorHandler.handleException(log, message, serviceName, e); } catch (IOException e) { - VFSTransportErrorHandler.handleException(log, "Cloud not create the folder", e); + VFSTransportErrorHandler.handleException(log, "Cloud not create the folder", serviceName, e); } } } diff --git a/modules/transports/core/vfs/src/main/java/org/apache/synapse/transport/vfs/VFSTransportSender.java b/modules/transports/core/vfs/src/main/java/org/apache/synapse/transport/vfs/VFSTransportSender.java index f11e9a3291..960404a4f4 100644 --- a/modules/transports/core/vfs/src/main/java/org/apache/synapse/transport/vfs/VFSTransportSender.java +++ b/modules/transports/core/vfs/src/main/java/org/apache/synapse/transport/vfs/VFSTransportSender.java @@ -212,13 +212,13 @@ public void sendMessage(MessageContext msgCtx, String targetAddress, } protected void writeFile(MessageContext msgCtx, VFSOutTransportInfo vfsOutInfo) throws AxisFault { - + String configName = (String) msgCtx.getProperty("_INTERNAL_TRIGGER_NAME"); FileSystemOptions fso = null; try { fso = VFSUtils.attachFileSystemOptions(vfsOutInfo.getOutFileSystemOptionsMap(), getFsManager()); } catch (Exception e) { VFSTransportErrorHandler.logException(log, LogType.ERROR, - "Error while attaching VFS file system properties. " + e.getMessage()); + "Error while attaching VFS file system properties. " + e.getMessage(), configName); } if (vfsOutInfo != null) { @@ -238,7 +238,7 @@ protected void writeFile(MessageContext msgCtx, VFSOutTransportInfo vfsOutInfo) retryCount++; replyFile = getFsManager().resolveFile(vfsOutInfo.getOutFileURI(), fso); if (replyFile == null) { - VFSTransportErrorHandler.logException(log, LogType.ERROR, "replyFile is null"); + VFSTransportErrorHandler.logException(log, LogType.ERROR, "replyFile is null", configName); throw new FileSystemException("replyFile is null"); } // Retry if actual filesystem is corrupted, Otherwise first file after connection reset @@ -247,15 +247,16 @@ protected void writeFile(MessageContext msgCtx, VFSOutTransportInfo vfsOutInfo) wasError = false; } catch (FileSystemException e) { - VFSTransportErrorHandler.logException(log, LogType.ERROR, "cannot resolve replyFile", e); + VFSTransportErrorHandler.logException(log, LogType.ERROR, + "cannot resolve replyFile", configName, e); if (replyFile != null) { - closeFileSystem(replyFile); + closeFileSystem(replyFile, configName); } else { - closeCachedFileSystem(vfsOutInfo, fso); + closeCachedFileSystem(vfsOutInfo, fso, configName); } if(maxRetryCount <= retryCount) { VFSTransportErrorHandler.handleException(log, "cannot resolve replyFile repeatedly: " - + e.getMessage(), e); + + e.getMessage(), configName, e); } } @@ -294,7 +295,7 @@ protected void writeFile(MessageContext msgCtx, VFSOutTransportInfo vfsOutInfo) // if file locking is not disabled acquire the lock // before uploading the file if (vfsOutInfo.isFileLockingEnabled()) { - acquireLockForSending(responseFile, vfsOutInfo, fso); + acquireLockForSending(responseFile, vfsOutInfo, fso, configName); populateResponseFile(responseFile, msgCtx,append, true, updateLastModified, fso); VFSUtils.releaseLock(getFsManager(), responseFile, fso); } else { @@ -306,7 +307,7 @@ protected void writeFile(MessageContext msgCtx, VFSOutTransportInfo vfsOutInfo) // if file locking is not disabled acquire the lock // before uploading the file if (vfsOutInfo.isFileLockingEnabled()) { - acquireLockForSending(replyFile, vfsOutInfo, fso); + acquireLockForSending(replyFile, vfsOutInfo, fso, configName); populateResponseFile(replyFile, msgCtx, append, true, updateLastModified, fso); VFSUtils.releaseLock(getFsManager(), replyFile, fso); } else { @@ -316,12 +317,12 @@ protected void writeFile(MessageContext msgCtx, VFSOutTransportInfo vfsOutInfo) } else { String message = "Unsupported reply file type : " + replyFile.getType() + " for file : " + VFSUtils.maskURLPassword(vfsOutInfo.getOutFileURI()); - VFSTransportErrorHandler.handleException(log, message); + VFSTransportErrorHandler.handleException(log, message, configName); } } else { // if file locking is not disabled acquire the lock before uploading the file if (vfsOutInfo.isFileLockingEnabled()) { - acquireLockForSending(replyFile, vfsOutInfo, fso); + acquireLockForSending(replyFile, vfsOutInfo, fso, configName); populateResponseFile(replyFile, msgCtx, append, true, updateLastModified, fso); VFSUtils.releaseLock(getFsManager(), replyFile, fso); } else { @@ -330,13 +331,13 @@ protected void writeFile(MessageContext msgCtx, VFSOutTransportInfo vfsOutInfo) } } catch (FileSystemException e) { if (replyFile != null) { - closeFileSystem(replyFile); + closeFileSystem(replyFile, configName); } else { - closeCachedFileSystem(vfsOutInfo, fso); + closeCachedFileSystem(vfsOutInfo, fso, configName); } String message = "Error resolving reply file : " + VFSUtils.maskURLPassword(vfsOutInfo.getOutFileURI()); - VFSTransportErrorHandler.handleException(log, message, e); + VFSTransportErrorHandler.handleException(log, message, configName, e); } finally { if (replyFile != null) { try { @@ -350,23 +351,25 @@ protected void writeFile(MessageContext msgCtx, VFSOutTransportInfo vfsOutInfo) replyFile.close(); } catch (Exception ex) { VFSTransportErrorHandler.logException(log, LogType.WARN, - "Error when closing the reply file", ex); + "Error when closing the reply file", configName, ex); } } } } else { VFSTransportErrorHandler.handleException(log, - "Unable to determine out transport information to send message"); + "Unable to determine out transport information to send message", configName); } } private MessageFormatter getMessageFormatter(MessageContext msgContext){ + String configName = (String) msgContext.getProperty("_INTERNAL_TRIGGER_NAME"); try { return MessageProcessorSelector.getMessageFormatter(msgContext); } catch (AxisFault axisFault) { + String message = "Unable to get the message formatter to use"; VFSTransportErrorHandler.throwException( - new BaseTransportException("Unable to get the message formatter to use")); + new BaseTransportException(VFSTransportErrorHandler.constructLogMessage(message, configName))); } return null; } @@ -376,7 +379,8 @@ protected void populateResponseFile(FileObject responseFile, MessageContext msgC FileSystemOptions fso) throws AxisFault { MessageFormatter messageFormatter = getMessageFormatter(msgContext); OMOutputFormat format = BaseUtils.getOMOutputFormat(msgContext); - + String configName = (String) msgContext.getProperty("_INTERNAL_TRIGGER_NAME"); + try { CountingOutputStream os = new CountingOutputStream( responseFile.getContent().getOutputStream(append)); @@ -396,7 +400,8 @@ protected void populateResponseFile(FileObject responseFile, MessageContext msgC } responseFile.getContent().setLastModifiedTime(lastModified); } catch (Exception e) { - VFSTransportErrorHandler.logException(log, LogType.WARN, "Could not set last modified.", e); + VFSTransportErrorHandler.logException(log, LogType.WARN, "Could not set last modified.", + configName, e); } } @@ -410,13 +415,14 @@ protected void populateResponseFile(FileObject responseFile, MessageContext msgC } metrics.incrementFaultsSending(); String responseFileURI = responseFile.getName().getURI(); - closeFileSystem(responseFile); + closeFileSystem(responseFile, configName); String message = "IO Error while creating response file : " + VFSUtils.maskURLPassword(responseFileURI); - VFSTransportErrorHandler.handleException(log, message, e); + VFSTransportErrorHandler.handleException(log, message, configName, e); } } - protected void acquireLockForSending(FileObject responseFile, VFSOutTransportInfo vfsOutInfo, FileSystemOptions fso) + protected void acquireLockForSending(FileObject responseFile, VFSOutTransportInfo vfsOutInfo, + FileSystemOptions fso, String configName) throws AxisFault { int tryNum = 0; @@ -426,12 +432,12 @@ protected void acquireLockForSending(FileObject responseFile, VFSOutTransportInf String message = "Couldn't send the message to file : " + VFSUtils.maskURLPassword(responseFile.getName().getURI()) + ", unable to acquire the " + "lock even after " + tryNum + " retries"; - VFSTransportErrorHandler.handleException(log, message); + VFSTransportErrorHandler.handleException(log, message, configName); } else { String message = "Couldn't get the lock for the file : " + VFSUtils.maskURLPassword(responseFile.getName().getURI()) + ", retry : " + tryNum + " scheduled after : " + vfsOutInfo.getReconnectTimeout(); - VFSTransportErrorHandler.logException(log, LogType.WARN, message); + VFSTransportErrorHandler.logException(log, LogType.WARN, message, configName); try { Thread.sleep(vfsOutInfo.getReconnectTimeout()); } catch (InterruptedException ignore) {} @@ -469,7 +475,7 @@ private void setOutOnlyMep(MessageContext msgCtx) { } } - private void closeFileSystem(FileObject fileObject) { + private void closeFileSystem(FileObject fileObject, String configName) { try { //Close the File system if it is not already closed if (fileObject != null && getFsManager() != null && fileObject.getParent() != null && fileObject.getParent().getFileSystem() != null) { @@ -478,15 +484,15 @@ private void closeFileSystem(FileObject fileObject) { fileObject.close(); } catch (FileSystemException warn) { String message = "Error on closing the file: " + fileObject.getName().getPath(); - VFSTransportErrorHandler.logException(log, LogType.WARN, message, warn); + VFSTransportErrorHandler.logException(log, LogType.WARN, message, configName, warn); } } - private void closeCachedFileSystem(VFSOutTransportInfo vfsOutInfo, FileSystemOptions fso) { + private void closeCachedFileSystem(VFSOutTransportInfo vfsOutInfo, FileSystemOptions fso, String configName) { try { ((DefaultFileSystemManager) getFsManager()).closeCachedFileSystem(vfsOutInfo.getOutFileURI(), fso); } catch (Exception e1) { - VFSTransportErrorHandler.logException(log, LogType.DEBUG, "Unable to clear file system", e1); + VFSTransportErrorHandler.logException(log, LogType.DEBUG, "Unable to clear file system", configName, e1); } }