From af09b4586ba87d15d82645232778389ce961fcce Mon Sep 17 00:00:00 2001 From: "Christopher L. Shannon (cshannon)" Date: Wed, 14 Oct 2015 11:35:18 +0000 Subject: [PATCH] Improving disk usage log message Improving the warning message for a percent disk usage check so it is more clear what the original limit was set to and what the current limit is being set to. --- .../java/org/apache/activemq/broker/BrokerService.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/activemq-broker/src/main/java/org/apache/activemq/broker/BrokerService.java b/activemq-broker/src/main/java/org/apache/activemq/broker/BrokerService.java index f2e831f41f..cb3808758b 100644 --- a/activemq-broker/src/main/java/org/apache/activemq/broker/BrokerService.java +++ b/activemq-broker/src/main/java/org/apache/activemq/broker/BrokerService.java @@ -2057,10 +2057,12 @@ public class BrokerService implements Service { } else if (storeLimit > totalUsableSpace) { if (percentLimit > 0) { LOG.warn(storeName + " limit has been set to " - + percentLimit + "% (" + storeLimit / oneMeg + " mb)" + + percentLimit + "% (" + bytePercentLimit / oneMeg + " mb)" + " of the partition size but there is not enough usable space." - + " Only " + totalUsableSpace * 100 / totalSpace + "% (" + totalUsableSpace / oneMeg + " mb)" - + " is available"); + + " The current store limit (which may have been adjusted by a" + + " previous usage limit check) is set to (" + storeLimit / oneMeg + " mb)" + + " but only " + totalUsableSpace * 100 / totalSpace + "% (" + totalUsableSpace / oneMeg + " mb)" + + " is available - resetting limit"); } LOG.warn(storeName + " limit is " + storeLimit / oneMeg +