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.
This commit is contained in:
Howard Gao 2018-01-30 21:13:50 +08:00 committed by Clebert Suconic
parent 5c6f0c6df3
commit 647954bf5a
1 changed files with 6 additions and 1 deletions

View File

@ -70,7 +70,12 @@ public class FileStoreMonitor extends ActiveMQScheduledComponent {
synchronized (monitorLock) { synchronized (monitorLock) {
// JDBC storage may return this as null, and we may need to ignore it // JDBC storage may return this as null, and we may need to ignore it
if (file != null && file.exists()) { 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; return this;
} }