Log feature license statuses on startup

Original commit: elastic/x-pack-elasticsearch@0cf5fc0354
This commit is contained in:
Areek Zillur 2014-11-13 17:47:10 -05:00
parent 8bf9b95033
commit eb5a06a1f9
3 changed files with 2 additions and 8 deletions

View File

@ -730,18 +730,14 @@ public class LicensesService extends AbstractLifecycleComponent<LicensesService>
private void enableFeatureIfNeeded() {
if (enabled.compareAndSet(false, true)) {
listener.onEnabled();
if (logger.isDebugEnabled()) {
logger.debug("feature: " + feature + " calling onEnabled");
}
logger.info("license for [" + feature + "] - valid");
}
}
private void disableFeatureIfNeeded() {
if (enabled.compareAndSet(true, false)) {
listener.onDisabled();
if (logger.isDebugEnabled()) {
logger.debug("feature: " + feature + " calling onDisabled");
}
logger.info("license for [" + feature + "] - expired");
}
}

View File

@ -14,7 +14,6 @@ import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.env.Environment;
import org.elasticsearch.license.core.ESLicense;
import org.elasticsearch.license.core.ESLicenses;
import org.elasticsearch.license.licensor.tools.LicenseGeneratorTool;
import org.junit.BeforeClass;
import org.junit.Rule;
import org.junit.Test;

View File

@ -14,7 +14,6 @@ import org.elasticsearch.env.Environment;
import org.elasticsearch.license.TestUtils;
import org.elasticsearch.license.core.ESLicense;
import org.elasticsearch.license.core.ESLicenses;
import org.elasticsearch.license.licensor.tools.LicenseVerificationTool;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;