From 9f014a9bf99ad29908fdb47f4cbf2594151980d3 Mon Sep 17 00:00:00 2001 From: Martijn van Groningen Date: Tue, 23 Dec 2014 16:41:16 +0100 Subject: [PATCH] slightly improved logging. Original commit: elastic/x-pack-elasticsearch@7a131bc4d882af49bfb60e005804d2bd6d3e094f --- src/main/java/org/elasticsearch/alerts/AlertsStore.java | 4 ++-- .../org/elasticsearch/alerts/actions/AlertActionManager.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/elasticsearch/alerts/AlertsStore.java b/src/main/java/org/elasticsearch/alerts/AlertsStore.java index 98cc861f9dc..9201c0f11dc 100644 --- a/src/main/java/org/elasticsearch/alerts/AlertsStore.java +++ b/src/main/java/org/elasticsearch/alerts/AlertsStore.java @@ -158,7 +158,7 @@ public class AlertsStore extends AbstractComponent { try { loadAlerts(); } catch (Exception e) { - logger.warn("Failed to load alerts", e); + logger.warn("Failed to load previously stored alerts. Schedule to retry alert loading...", e); alertMap.clear(); return false; } @@ -166,7 +166,7 @@ public class AlertsStore extends AbstractComponent { started.set(true); return true; } else { - logger.info("Not all primary shards of the .alerts index are started"); + logger.warn("Not all primary shards of the .alerts index are started. Schedule to retry alert loading..."); return false; } } else { diff --git a/src/main/java/org/elasticsearch/alerts/actions/AlertActionManager.java b/src/main/java/org/elasticsearch/alerts/actions/AlertActionManager.java index 2f502f31865..b27f22e1fa4 100644 --- a/src/main/java/org/elasticsearch/alerts/actions/AlertActionManager.java +++ b/src/main/java/org/elasticsearch/alerts/actions/AlertActionManager.java @@ -119,7 +119,7 @@ public class AlertActionManager extends AbstractComponent { IndexMetaData indexMetaData = state.getMetaData().index(index); if (indexMetaData != null) { if (!state.routingTable().index(index).allPrimaryShardsActive()) { - logger.info("Not all primary shards of the [{}] index are started", index); + logger.warn("Not all primary shards of the [{}] index are started. Schedule to retry alert action loading..", index); return false; } } @@ -128,7 +128,7 @@ public class AlertActionManager extends AbstractComponent { try { loadQueue(); } catch (Exception e) { - logger.error("Unable to load unfinished jobs into the job queue", e); + logger.warn("Failed to load unfinished alert actions. Schedule to retry alert action loading...", e); actionsToBeProcessed.clear(); return false; }