From 647954bf5abf66480263f5f92d884e843f0c0018 Mon Sep 17 00:00:00 2001 From: Howard Gao Date: Tue, 30 Jan 2018 21:13:50 +0800 Subject: [PATCH] ARTEMIS-1642 Add log info to FileStoreMonitor Adding log info in case that an IOException is thrown from the underlying file system to provide information for debugging. --- .../artemis/core/server/files/FileStoreMonitor.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/files/FileStoreMonitor.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/files/FileStoreMonitor.java index 8cd7fef5a0..2c3d28c748 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/files/FileStoreMonitor.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/files/FileStoreMonitor.java @@ -70,7 +70,12 @@ public class FileStoreMonitor extends ActiveMQScheduledComponent { synchronized (monitorLock) { // JDBC storage may return this as null, and we may need to ignore it if (file != null && file.exists()) { - addStore(Files.getFileStore(file.toPath())); + try { + addStore(Files.getFileStore(file.toPath())); + } catch (IOException e) { + logger.error("Error getting file store for " + file.getAbsolutePath(), e); + throw e; + } } return this; }