move ESLoggerFactory usage to LogManager (#33043)
Work done in #32513 has deprecated the old constructor in favor of log4j2's LogManager
This commit is contained in:
parent
96869b253c
commit
55cb08a352
|
@ -7,6 +7,7 @@ package org.elasticsearch.xpack.core.indexlifecycle;
|
|||
|
||||
import com.carrotsearch.hppc.cursors.ObjectCursor;
|
||||
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.elasticsearch.action.support.ActiveShardCount;
|
||||
import org.elasticsearch.cluster.ClusterState;
|
||||
|
@ -20,7 +21,6 @@ import org.elasticsearch.cluster.routing.allocation.decider.FilterAllocationDeci
|
|||
import org.elasticsearch.common.ParseField;
|
||||
import org.elasticsearch.common.Strings;
|
||||
import org.elasticsearch.common.collect.ImmutableOpenIntMap;
|
||||
import org.elasticsearch.common.logging.ESLoggerFactory;
|
||||
import org.elasticsearch.common.settings.ClusterSettings;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.xcontent.ConstructingObjectParser;
|
||||
|
@ -36,7 +36,7 @@ import java.util.Objects;
|
|||
public class AllocationRoutedStep extends ClusterStateWaitStep {
|
||||
public static final String NAME = "check-allocation";
|
||||
|
||||
private static final Logger logger = ESLoggerFactory.getLogger(AllocationRoutedStep.class);
|
||||
private static final Logger logger = LogManager.getLogger(AllocationRoutedStep.class);
|
||||
|
||||
private static final AllocationDeciders ALLOCATION_DECIDERS = new AllocationDeciders(Settings.EMPTY, Collections.singletonList(
|
||||
new FilterAllocationDecider(Settings.EMPTY, new ClusterSettings(Settings.EMPTY, ClusterSettings.BUILT_IN_CLUSTER_SETTINGS))));
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
*/
|
||||
package org.elasticsearch.xpack.core.indexlifecycle;
|
||||
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.elasticsearch.client.Client;
|
||||
import org.elasticsearch.cluster.AbstractDiffable;
|
||||
|
@ -13,7 +14,6 @@ import org.elasticsearch.common.ParseField;
|
|||
import org.elasticsearch.common.Strings;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
import org.elasticsearch.common.logging.ESLoggerFactory;
|
||||
import org.elasticsearch.common.xcontent.ConstructingObjectParser;
|
||||
import org.elasticsearch.common.xcontent.ToXContentObject;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
|
@ -40,7 +40,7 @@ import java.util.stream.Collectors;
|
|||
*/
|
||||
public class LifecyclePolicy extends AbstractDiffable<LifecyclePolicy>
|
||||
implements ToXContentObject, Diffable<LifecyclePolicy> {
|
||||
private static final Logger logger = ESLoggerFactory.getLogger(LifecyclePolicy.class);
|
||||
private static final Logger logger = LogManager.getLogger(LifecyclePolicy.class);
|
||||
|
||||
public static final ParseField PHASES_FIELD = new ParseField("phases");
|
||||
|
||||
|
|
|
@ -6,12 +6,12 @@
|
|||
|
||||
package org.elasticsearch.xpack.indexlifecycle;
|
||||
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.elasticsearch.ElasticsearchException;
|
||||
import org.elasticsearch.cluster.ClusterState;
|
||||
import org.elasticsearch.cluster.ClusterStateUpdateTask;
|
||||
import org.elasticsearch.cluster.metadata.IndexMetaData;
|
||||
import org.elasticsearch.common.logging.ESLoggerFactory;
|
||||
import org.elasticsearch.common.xcontent.ToXContentObject;
|
||||
import org.elasticsearch.index.Index;
|
||||
import org.elasticsearch.xpack.core.indexlifecycle.ClusterStateActionStep;
|
||||
|
@ -22,7 +22,7 @@ import java.io.IOException;
|
|||
import java.util.function.LongSupplier;
|
||||
|
||||
public class ExecuteStepsUpdateTask extends ClusterStateUpdateTask {
|
||||
private static final Logger logger = ESLoggerFactory.getLogger(ExecuteStepsUpdateTask.class);
|
||||
private static final Logger logger = LogManager.getLogger(ExecuteStepsUpdateTask.class);
|
||||
private final String policy;
|
||||
private final Index index;
|
||||
private final Step startStep;
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
package org.elasticsearch.xpack.indexlifecycle;
|
||||
|
||||
import com.carrotsearch.hppc.cursors.ObjectCursor;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.elasticsearch.ElasticsearchException;
|
||||
import org.elasticsearch.action.support.TransportAction;
|
||||
|
@ -15,7 +16,6 @@ import org.elasticsearch.cluster.metadata.MetaData;
|
|||
import org.elasticsearch.cluster.service.ClusterService;
|
||||
import org.elasticsearch.common.Strings;
|
||||
import org.elasticsearch.common.bytes.BytesReference;
|
||||
import org.elasticsearch.common.logging.ESLoggerFactory;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.xcontent.ToXContent;
|
||||
import org.elasticsearch.common.xcontent.ToXContentObject;
|
||||
|
@ -43,7 +43,7 @@ import java.util.Map;
|
|||
import java.util.function.LongSupplier;
|
||||
|
||||
public class IndexLifecycleRunner {
|
||||
private static final Logger logger = ESLoggerFactory.getLogger(IndexLifecycleRunner.class);
|
||||
private static final Logger logger = LogManager.getLogger(IndexLifecycleRunner.class);
|
||||
private PolicyStepsRegistry stepRegistry;
|
||||
private ClusterService clusterService;
|
||||
private LongSupplier nowSupplier;
|
||||
|
|
|
@ -7,6 +7,7 @@ package org.elasticsearch.xpack.indexlifecycle;
|
|||
|
||||
import com.carrotsearch.hppc.cursors.ObjectCursor;
|
||||
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.apache.lucene.util.SetOnce;
|
||||
import org.elasticsearch.client.Client;
|
||||
|
@ -18,7 +19,6 @@ import org.elasticsearch.cluster.metadata.IndexMetaData;
|
|||
import org.elasticsearch.cluster.service.ClusterService;
|
||||
import org.elasticsearch.common.Strings;
|
||||
import org.elasticsearch.common.component.AbstractComponent;
|
||||
import org.elasticsearch.common.logging.ESLoggerFactory;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.unit.TimeValue;
|
||||
import org.elasticsearch.protocol.xpack.indexlifecycle.OperationMode;
|
||||
|
@ -40,7 +40,7 @@ import java.util.function.LongSupplier;
|
|||
*/
|
||||
public class IndexLifecycleService extends AbstractComponent
|
||||
implements ClusterStateListener, ClusterStateApplier, SchedulerEngine.Listener, Closeable {
|
||||
private static final Logger logger = ESLoggerFactory.getLogger(IndexLifecycleService.class);
|
||||
private static final Logger logger = LogManager.getLogger(IndexLifecycleService.class);
|
||||
private static final Set<String> IGNORE_ACTIONS_MAINTENANCE_REQUESTED = Collections.singleton(ShrinkAction.NAME);
|
||||
|
||||
private final SetOnce<SchedulerEngine> scheduler = new SetOnce<>();
|
||||
|
|
|
@ -5,16 +5,16 @@
|
|||
*/
|
||||
package org.elasticsearch.xpack.indexlifecycle;
|
||||
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.elasticsearch.cluster.ClusterState;
|
||||
import org.elasticsearch.cluster.ClusterStateUpdateTask;
|
||||
import org.elasticsearch.cluster.metadata.MetaData;
|
||||
import org.elasticsearch.common.logging.ESLoggerFactory;
|
||||
import org.elasticsearch.protocol.xpack.indexlifecycle.OperationMode;
|
||||
import org.elasticsearch.xpack.core.indexlifecycle.IndexLifecycleMetadata;
|
||||
|
||||
public class OperationModeUpdateTask extends ClusterStateUpdateTask {
|
||||
private static final Logger logger = ESLoggerFactory.getLogger(OperationModeUpdateTask.class);
|
||||
private static final Logger logger = LogManager.getLogger(OperationModeUpdateTask.class);
|
||||
private final OperationMode mode;
|
||||
|
||||
public OperationModeUpdateTask(OperationMode mode) {
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
package org.elasticsearch.xpack.indexlifecycle;
|
||||
|
||||
import com.carrotsearch.hppc.cursors.ObjectCursor;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.elasticsearch.client.Client;
|
||||
import org.elasticsearch.cluster.ClusterState;
|
||||
|
@ -15,7 +16,6 @@ import org.elasticsearch.cluster.metadata.IndexMetaData;
|
|||
import org.elasticsearch.common.Nullable;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
import org.elasticsearch.common.logging.ESLoggerFactory;
|
||||
import org.elasticsearch.index.Index;
|
||||
import org.elasticsearch.xpack.core.ClientHelper;
|
||||
import org.elasticsearch.xpack.core.indexlifecycle.ErrorStep;
|
||||
|
@ -34,7 +34,7 @@ import java.util.function.LongSupplier;
|
|||
import java.util.stream.Collectors;
|
||||
|
||||
public class PolicyStepsRegistry {
|
||||
private static final Logger logger = ESLoggerFactory.getLogger(PolicyStepsRegistry.class);
|
||||
private static final Logger logger = LogManager.getLogger(PolicyStepsRegistry.class);
|
||||
|
||||
// keeps track of existing policies in the cluster state
|
||||
private final SortedMap<String, LifecyclePolicyMetadata> lifecyclePolicyMap;
|
||||
|
|
Loading…
Reference in New Issue