From 5161b540a9ded0fbc5d6cd374831bb1926af9ce1 Mon Sep 17 00:00:00 2001 From: Tanguy Leroux Date: Thu, 12 May 2016 18:31:27 +0200 Subject: [PATCH] Move unneeded log info messages to debug closes elastic/elasticsearch#2228, elastic/elasticsearch#2227 Original commit: elastic/x-pack-elasticsearch@558751c4248367df561a55d8ec5ec5e2239d4f91 --- elasticsearch/qa/smoke-test-plugins-ssl/build.gradle | 3 +++ .../java/org/elasticsearch/marvel/agent/AgentService.java | 3 ++- .../org/elasticsearch/xpack/watcher/WatcherService.java | 8 ++++---- .../xpack/watcher/trigger/schedule/ScheduleModule.java | 2 +- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/elasticsearch/qa/smoke-test-plugins-ssl/build.gradle b/elasticsearch/qa/smoke-test-plugins-ssl/build.gradle index 20b91d468f4..8581f51a63c 100644 --- a/elasticsearch/qa/smoke-test-plugins-ssl/build.gradle +++ b/elasticsearch/qa/smoke-test-plugins-ssl/build.gradle @@ -177,6 +177,9 @@ integTest { setupCommand 'setupMarvelUser', 'bin/x-pack/users', 'useradd', 'monitoring_agent', '-p', 'changeme', '-r', 'remote_monitoring_agent' + // Required to detect that the monitoring agent service has started + systemProperty 'es.logger.level', 'DEBUG' + waitCondition = { node, ant -> // HTTPS check is tricky to do, so we wait for the log file to indicate that the node is started String waitForNodeStartProp = "waitForNodeStart${name}" diff --git a/elasticsearch/x-pack/marvel/src/main/java/org/elasticsearch/marvel/agent/AgentService.java b/elasticsearch/x-pack/marvel/src/main/java/org/elasticsearch/marvel/agent/AgentService.java index 697c9b0f52a..aeea9b229e7 100644 --- a/elasticsearch/x-pack/marvel/src/main/java/org/elasticsearch/marvel/agent/AgentService.java +++ b/elasticsearch/x-pack/marvel/src/main/java/org/elasticsearch/marvel/agent/AgentService.java @@ -120,7 +120,8 @@ public class AgentService extends AbstractLifecycleComponent { @Override protected void doStart() { - logger.info("monitoring service started"); + // Please don't remove this log message since it can be used in integration tests + logger.debug("monitoring service started"); for (Collector collector : collectors) { collector.start(); diff --git a/elasticsearch/x-pack/watcher/src/main/java/org/elasticsearch/xpack/watcher/WatcherService.java b/elasticsearch/x-pack/watcher/src/main/java/org/elasticsearch/xpack/watcher/WatcherService.java index bcbb7560590..540d6c4f875 100644 --- a/elasticsearch/x-pack/watcher/src/main/java/org/elasticsearch/xpack/watcher/WatcherService.java +++ b/elasticsearch/x-pack/watcher/src/main/java/org/elasticsearch/xpack/watcher/WatcherService.java @@ -64,7 +64,7 @@ public class WatcherService extends AbstractComponent { public void start(ClusterState clusterState) throws Exception { if (state.compareAndSet(WatcherState.STOPPED, WatcherState.STARTING)) { try { - logger.info("starting watch service..."); + logger.debug("starting watch service..."); watcherIndexTemplateRegistry.addTemplatesIfMissing(); watchLockService.start(); @@ -74,7 +74,7 @@ public class WatcherService extends AbstractComponent { triggerService.start(watchStore.activeWatches()); state.set(WatcherState.STARTED); - logger.info("watch service has started"); + logger.debug("watch service has started"); } catch (Exception e) { state.set(WatcherState.STOPPED); throw e; @@ -90,7 +90,7 @@ public class WatcherService extends AbstractComponent { public void stop() { if (state.compareAndSet(WatcherState.STARTED, WatcherState.STOPPING)) { - logger.info("stopping watch service..."); + logger.debug("stopping watch service..."); triggerService.stop(); executionService.stop(); try { @@ -100,7 +100,7 @@ public class WatcherService extends AbstractComponent { } watchStore.stop(); state.set(WatcherState.STOPPED); - logger.info("watch service has stopped"); + logger.debug("watch service has stopped"); } else { logger.debug("not stopping watcher, because its state is [{}] while [{}] is expected", state, WatcherState.STARTED); } diff --git a/elasticsearch/x-pack/watcher/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/ScheduleModule.java b/elasticsearch/x-pack/watcher/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/ScheduleModule.java index 7c6170fbf93..407362814cf 100644 --- a/elasticsearch/x-pack/watcher/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/ScheduleModule.java +++ b/elasticsearch/x-pack/watcher/src/main/java/org/elasticsearch/xpack/watcher/trigger/schedule/ScheduleModule.java @@ -36,7 +36,7 @@ public class ScheduleModule extends AbstractModule { public static Class triggerEngineType(Settings nodeSettings) { Engine engine = Engine.resolve(nodeSettings); - Loggers.getLogger(ScheduleModule.class, nodeSettings).info("using [{}] schedule trigger engine", + Loggers.getLogger(ScheduleModule.class, nodeSettings).debug("using [{}] schedule trigger engine", engine.name().toLowerCase(Locale.ROOT)); return engine.engineType(); }