Adjusts logging levels to be more realistic
Makes most logging at debug rather than warn and error. x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/inde xlifecycle/ExecuteStepsUpdateTask.java x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/inde xlifecycle/IndexLifecycleRunner.java x-pack/plugin/index-lifecycle/src/main/java/org/elasticsearch/xpack/inde xlifecycle/IndexLifecycleService.java
This commit is contained in:
parent
a03241d590
commit
54d1efd73b
|
@ -82,7 +82,7 @@ public class ExecuteStepsUpdateTask extends ClusterStateUpdateTask {
|
|||
currentState = IndexLifecycleRunner.moveClusterStateToNextStep(index, currentState, currentStep.getKey(),
|
||||
currentStep.getNextStepKey(), nowSupplier);
|
||||
} else {
|
||||
logger.warn("condition not met, returning existing state");
|
||||
logger.debug("condition not met, returning existing state");
|
||||
return currentState;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -42,7 +42,7 @@ public class IndexLifecycleRunner {
|
|||
boolean fromClusterStateChange) {
|
||||
Settings indexSettings = indexMetaData.getSettings();
|
||||
Step currentStep = getCurrentStep(stepRegistry, policy, indexSettings);
|
||||
logger.warn("running policy with current-step[" + currentStep.getKey() + "]");
|
||||
logger.debug("running policy with current-step[" + currentStep.getKey() + "]");
|
||||
if (currentStep instanceof TerminalPolicyStep) {
|
||||
logger.debug("policy [" + policy + "] for index [" + indexMetaData.getIndex().getName() + "] complete, skipping execution");
|
||||
} else if (currentStep instanceof ErrorStep) {
|
||||
|
@ -56,7 +56,7 @@ public class IndexLifecycleRunner {
|
|||
|
||||
@Override
|
||||
public void onResponse(boolean conditionMet) {
|
||||
logger.error("cs-change-async-wait-callback. current-step:" + currentStep.getKey());
|
||||
logger.debug("cs-change-async-wait-callback. current-step:" + currentStep.getKey());
|
||||
if (conditionMet) {
|
||||
moveToStep(indexMetaData.getIndex(), policy, currentStep.getKey(), currentStep.getNextStepKey());
|
||||
}
|
||||
|
@ -75,7 +75,7 @@ public class IndexLifecycleRunner {
|
|||
|
||||
@Override
|
||||
public void onResponse(boolean complete) {
|
||||
logger.error("cs-change-async-action-callback. current-step:" + currentStep.getKey());
|
||||
logger.debug("cs-change-async-action-callback. current-step:" + currentStep.getKey());
|
||||
if (complete && ((AsyncActionStep) currentStep).indexSurvives()) {
|
||||
moveToStep(indexMetaData.getIndex(), policy, currentStep.getKey(), currentStep.getNextStepKey());
|
||||
}
|
||||
|
@ -178,14 +178,14 @@ public class IndexLifecycleRunner {
|
|||
}
|
||||
|
||||
private void moveToStep(Index index, String policy, StepKey currentStepKey, StepKey nextStepKey) {
|
||||
logger.error("moveToStep[" + policy + "] [" + index.getName() + "]" + currentStepKey + " -> "
|
||||
logger.debug("moveToStep[" + policy + "] [" + index.getName() + "]" + currentStepKey + " -> "
|
||||
+ nextStepKey);
|
||||
clusterService.submitStateUpdateTask("ILM", new MoveToNextStepUpdateTask(index, policy, currentStepKey,
|
||||
nextStepKey, nowSupplier, newState -> runPolicy(newState.getMetaData().index(index), newState)));
|
||||
}
|
||||
|
||||
private void moveToErrorStep(Index index, String policy, StepKey currentStepKey, Exception e) {
|
||||
logger.error("policy [" + policy + "] for index [" + index.getName() + "] failed on step [" + currentStepKey
|
||||
logger.debug("policy [" + policy + "] for index [" + index.getName() + "] failed on step [" + currentStepKey
|
||||
+ "]. Moving to ERROR step.", e);
|
||||
clusterService.submitStateUpdateTask("ILM", new MoveToErrorStepUpdateTask(index, policy, currentStepKey, nowSupplier));
|
||||
}
|
||||
|
|
|
@ -119,7 +119,7 @@ public class IndexLifecycleService extends AbstractComponent
|
|||
@Override
|
||||
public void triggered(SchedulerEngine.Event event) {
|
||||
if (event.getJobName().equals(IndexLifecycle.NAME)) {
|
||||
logger.info("Job triggered: " + event.getJobName() + ", " + event.getScheduledTime() + ", " + event.getTriggeredTime());
|
||||
logger.debug("Job triggered: " + event.getJobName() + ", " + event.getScheduledTime() + ", " + event.getTriggeredTime());
|
||||
triggerPolicies(clusterService.state(), false);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue