https://issues.apache.org/jira/browse/AMQ-6278 - revisit LeaseDatabaseLocker log levels

This commit is contained in:
Dejan Bosanac 2016-05-03 14:52:19 +02:00
parent ba77b9f55a
commit 2e00891827
1 changed files with 3 additions and 3 deletions

View File

@ -83,7 +83,7 @@ public class LeaseDatabaseLocker extends AbstractJDBCLocker {
reportLeasOwnerShipAndDuration(connection); reportLeasOwnerShipAndDuration(connection);
} catch (Exception e) { } catch (Exception e) {
LOG.debug(getLeaseHolderId() + " lease acquire failure: "+ e, e); LOG.warn(getLeaseHolderId() + " lease acquire failure: "+ e, e);
if (isStopping()) { if (isStopping()) {
throw new Exception( throw new Exception(
"Cannot start broker as being asked to shut down. " "Cannot start broker as being asked to shut down. "
@ -98,7 +98,7 @@ public class LeaseDatabaseLocker extends AbstractJDBCLocker {
close(connection); close(connection);
} }
LOG.info(getLeaseHolderId() + " failed to acquire lease. Sleeping for " + lockAcquireSleepInterval + " milli(s) before trying again..."); LOG.debug(getLeaseHolderId() + " failed to acquire lease. Sleeping for " + lockAcquireSleepInterval + " milli(s) before trying again...");
TimeUnit.MILLISECONDS.sleep(lockAcquireSleepInterval); TimeUnit.MILLISECONDS.sleep(lockAcquireSleepInterval);
} }
if (isStopping()) { if (isStopping()) {
@ -114,7 +114,7 @@ public class LeaseDatabaseLocker extends AbstractJDBCLocker {
statement = connection.prepareStatement(getStatements().getLeaseOwnerStatement()); statement = connection.prepareStatement(getStatements().getLeaseOwnerStatement());
ResultSet resultSet = statement.executeQuery(); ResultSet resultSet = statement.executeQuery();
while (resultSet.next()) { while (resultSet.next()) {
LOG.info(getLeaseHolderId() + " Lease held by " + resultSet.getString(1) + " till " + new Date(resultSet.getLong(2))); LOG.debug(getLeaseHolderId() + " Lease held by " + resultSet.getString(1) + " till " + new Date(resultSet.getLong(2)));
} }
} finally { } finally {
close(statement); close(statement);