slightly improved logging.

Original commit: elastic/x-pack-elasticsearch@7a131bc4d8
This commit is contained in:
Martijn van Groningen 2014-12-23 16:41:16 +01:00
parent df7fc714e7
commit 9f014a9bf9
2 changed files with 4 additions and 4 deletions

View File

@ -158,7 +158,7 @@ public class AlertsStore extends AbstractComponent {
try { try {
loadAlerts(); loadAlerts();
} catch (Exception e) { } 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(); alertMap.clear();
return false; return false;
} }
@ -166,7 +166,7 @@ public class AlertsStore extends AbstractComponent {
started.set(true); started.set(true);
return true; return true;
} else { } 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; return false;
} }
} else { } else {

View File

@ -119,7 +119,7 @@ public class AlertActionManager extends AbstractComponent {
IndexMetaData indexMetaData = state.getMetaData().index(index); IndexMetaData indexMetaData = state.getMetaData().index(index);
if (indexMetaData != null) { if (indexMetaData != null) {
if (!state.routingTable().index(index).allPrimaryShardsActive()) { 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; return false;
} }
} }
@ -128,7 +128,7 @@ public class AlertActionManager extends AbstractComponent {
try { try {
loadQueue(); loadQueue();
} catch (Exception e) { } 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(); actionsToBeProcessed.clear();
return false; return false;
} }