From eb5a06a1f9eb0fb53163043782f590f09aa71e15 Mon Sep 17 00:00:00 2001 From: Areek Zillur Date: Thu, 13 Nov 2014 17:47:10 -0500 Subject: [PATCH] Log feature license statuses on startup Original commit: elastic/x-pack-elasticsearch@0cf5fc03549e9898ee25db2a918a13150127fddc --- .../license/plugin/core/LicensesService.java | 8 ++------ .../licensor/tools/LicenseGenerationToolTests.java | 1 - .../licensor/tools/LicenseVerificationToolTests.java | 1 - 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/main/java/org/elasticsearch/license/plugin/core/LicensesService.java b/src/main/java/org/elasticsearch/license/plugin/core/LicensesService.java index a8ec72f5c80..15a5f8e70bf 100644 --- a/src/main/java/org/elasticsearch/license/plugin/core/LicensesService.java +++ b/src/main/java/org/elasticsearch/license/plugin/core/LicensesService.java @@ -730,18 +730,14 @@ public class LicensesService extends AbstractLifecycleComponent 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"); } } diff --git a/src/test/java/org/elasticsearch/license/licensor/tools/LicenseGenerationToolTests.java b/src/test/java/org/elasticsearch/license/licensor/tools/LicenseGenerationToolTests.java index 2698b6c61f0..3ad3f65901e 100644 --- a/src/test/java/org/elasticsearch/license/licensor/tools/LicenseGenerationToolTests.java +++ b/src/test/java/org/elasticsearch/license/licensor/tools/LicenseGenerationToolTests.java @@ -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; diff --git a/src/test/java/org/elasticsearch/license/licensor/tools/LicenseVerificationToolTests.java b/src/test/java/org/elasticsearch/license/licensor/tools/LicenseVerificationToolTests.java index 8c9778cda0c..ac94bc932d1 100644 --- a/src/test/java/org/elasticsearch/license/licensor/tools/LicenseVerificationToolTests.java +++ b/src/test/java/org/elasticsearch/license/licensor/tools/LicenseVerificationToolTests.java @@ -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;