Merge pull request elastic/elasticsearch#2258 from areek/fix/2230

Fix license log message levels

Original commit: elastic/x-pack-elasticsearch@c1fe244dd8
This commit is contained in:
Areek Zillur 2016-05-17 15:09:05 -04:00
commit a134ec613d

View File

@ -515,7 +515,7 @@ public class LicensesService extends AbstractLifecycleComponent<LicensesService>
logger.debug("notifying [{}] listeners", registeredLicensees.size());
long now = System.currentTimeMillis();
if (license.issueDate() > now) {
logger.info("license [{}] - invalid", license.uid());
logger.warn("license [{}] - invalid", license.uid());
return;
}
long expiryDuration = license.expiryDate() - now;
@ -523,7 +523,7 @@ public class LicensesService extends AbstractLifecycleComponent<LicensesService>
for (InternalLicensee licensee : registeredLicensees) {
licensee.onChange(license, LicenseState.ENABLED);
}
logger.info("license [{}] - valid", license.uid());
logger.debug("license [{}] - valid", license.uid());
final TimeValue delay = TimeValue.timeValueMillis(expiryDuration);
// cancel any previous notifications
cancelNotifications(expiryNotifications);
@ -537,7 +537,7 @@ public class LicensesService extends AbstractLifecycleComponent<LicensesService>
for (InternalLicensee licensee : registeredLicensees) {
licensee.onChange(license, LicenseState.GRACE_PERIOD);
}
logger.info("license [{}] - grace", license.uid());
logger.warn("license [{}] - grace", license.uid());
final TimeValue delay = TimeValue.timeValueMillis(expiryDuration + gracePeriodDuration.getMillis());
// cancel any previous notifications
cancelNotifications(expiryNotifications);
@ -551,7 +551,7 @@ public class LicensesService extends AbstractLifecycleComponent<LicensesService>
for (InternalLicensee licensee : registeredLicensees) {
licensee.onChange(license, LicenseState.DISABLED);
}
logger.info("license [{}] - expired", license.uid());
logger.warn("license [{}] - expired", license.uid());
}
if (!license.equals(currentLicense.get())) {
currentLicense.set(license);