diff --git a/modules/transport-netty4/src/main/java/org/elasticsearch/http/netty4/Netty4HttpServerTransport.java b/modules/transport-netty4/src/main/java/org/elasticsearch/http/netty4/Netty4HttpServerTransport.java index 6c29c3f8db8b3..71e3b42279ca4 100644 --- a/modules/transport-netty4/src/main/java/org/elasticsearch/http/netty4/Netty4HttpServerTransport.java +++ b/modules/transport-netty4/src/main/java/org/elasticsearch/http/netty4/Netty4HttpServerTransport.java @@ -42,11 +42,14 @@ import io.netty.handler.codec.http.HttpResponseEncoder; import io.netty.handler.timeout.ReadTimeoutException; import io.netty.handler.timeout.ReadTimeoutHandler; +import org.apache.logging.log4j.Logger; +import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.message.ParameterizedMessage; import org.apache.logging.log4j.util.Supplier; import org.elasticsearch.ExceptionsHelper; import org.elasticsearch.common.Strings; import org.elasticsearch.common.component.AbstractLifecycleComponent; +import org.elasticsearch.common.logging.DeprecationLogger; import org.elasticsearch.common.network.NetworkAddress; import org.elasticsearch.common.network.NetworkService; import org.elasticsearch.common.settings.Setting; @@ -122,6 +125,8 @@ import static org.elasticsearch.http.netty4.cors.Netty4CorsHandler.ANY_ORIGIN; public class Netty4HttpServerTransport extends AbstractLifecycleComponent implements HttpServerTransport { + private static final Logger logger = LogManager.getLogger(Netty4HttpServerTransport.class); + private static final DeprecationLogger deprecationLogger = new DeprecationLogger(logger); static { Netty4Utils.setup(); @@ -619,7 +624,7 @@ protected void initChannel(Channel ch) throws Exception { ch.pipeline().addLast("cors", new Netty4CorsHandler(transport.getCorsConfig())); } if (transport.pipelining) { - ch.pipeline().addLast("pipelining", new HttpPipeliningHandler(transport.logger, transport.pipeliningMaxEvents)); + ch.pipeline().addLast("pipelining", new HttpPipeliningHandler(logger, transport.pipeliningMaxEvents)); } ch.pipeline().addLast("handler", requestHandler); } diff --git a/plugins/repository-s3/src/main/java/org/elasticsearch/repositories/s3/S3Repository.java b/plugins/repository-s3/src/main/java/org/elasticsearch/repositories/s3/S3Repository.java index d884ab0cb97ef..a2f600a34ae2c 100644 --- a/plugins/repository-s3/src/main/java/org/elasticsearch/repositories/s3/S3Repository.java +++ b/plugins/repository-s3/src/main/java/org/elasticsearch/repositories/s3/S3Repository.java @@ -20,10 +20,13 @@ package org.elasticsearch.repositories.s3; import com.amazonaws.auth.BasicAWSCredentials; +import org.apache.logging.log4j.Logger; +import org.apache.logging.log4j.LogManager; import org.elasticsearch.cluster.metadata.RepositoryMetaData; import org.elasticsearch.common.Strings; import org.elasticsearch.common.blobstore.BlobPath; import org.elasticsearch.common.blobstore.BlobStore; +import org.elasticsearch.common.logging.DeprecationLogger; import org.elasticsearch.common.settings.SecureSetting; import org.elasticsearch.common.settings.SecureString; import org.elasticsearch.common.settings.Setting; @@ -51,6 +54,8 @@ * */ class S3Repository extends BlobStoreRepository { + private static final Logger logger = LogManager.getLogger(S3Repository.class); + private static final DeprecationLogger deprecationLogger = new DeprecationLogger(logger); static final String TYPE = "s3"; diff --git a/qa/smoke-test-http/src/test/java/org/elasticsearch/http/TestDeprecationHeaderRestAction.java b/qa/smoke-test-http/src/test/java/org/elasticsearch/http/TestDeprecationHeaderRestAction.java index 11dcfd76fa5ac..ad38d89654a21 100644 --- a/qa/smoke-test-http/src/test/java/org/elasticsearch/http/TestDeprecationHeaderRestAction.java +++ b/qa/smoke-test-http/src/test/java/org/elasticsearch/http/TestDeprecationHeaderRestAction.java @@ -18,7 +18,10 @@ */ package org.elasticsearch.http; +import org.apache.logging.log4j.Logger; +import org.apache.logging.log4j.LogManager; import org.elasticsearch.client.node.NodeClient; +import org.elasticsearch.common.logging.DeprecationLogger; import org.elasticsearch.common.settings.Setting; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.xcontent.XContentBuilder; @@ -42,6 +45,8 @@ * and returns their values. */ public class TestDeprecationHeaderRestAction extends BaseRestHandler { + private static final Logger logger = LogManager.getLogger(TestDeprecationHeaderRestAction.class); + private static final DeprecationLogger deprecationLogger = new DeprecationLogger(logger); public static final Setting TEST_DEPRECATED_SETTING_TRUE1 = Setting.boolSetting("test.setting.deprecated.true1", true, diff --git a/server/src/main/java/org/elasticsearch/cluster/metadata/MetaDataCreateIndexService.java b/server/src/main/java/org/elasticsearch/cluster/metadata/MetaDataCreateIndexService.java index c04af67424b07..9be417941ca4a 100644 --- a/server/src/main/java/org/elasticsearch/cluster/metadata/MetaDataCreateIndexService.java +++ b/server/src/main/java/org/elasticsearch/cluster/metadata/MetaDataCreateIndexService.java @@ -21,6 +21,7 @@ import com.carrotsearch.hppc.cursors.ObjectObjectCursor; import org.apache.logging.log4j.Logger; +import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.message.ParameterizedMessage; import org.elasticsearch.ElasticsearchException; import org.elasticsearch.ResourceAlreadyExistsException; @@ -54,7 +55,6 @@ import org.elasticsearch.common.compress.CompressedXContent; import org.elasticsearch.common.io.PathUtils; import org.elasticsearch.common.logging.DeprecationLogger; -import org.elasticsearch.common.logging.Loggers; import org.elasticsearch.common.settings.IndexScopedSettings; import org.elasticsearch.common.settings.Setting; import org.elasticsearch.common.settings.Settings; @@ -100,8 +100,8 @@ * Service responsible for submitting create index requests */ public class MetaDataCreateIndexService extends AbstractComponent { - - private static final DeprecationLogger deprecationLogger = new DeprecationLogger(Loggers.getLogger(MetaDataCreateIndexService.class)); + private static final Logger logger = LogManager.getLogger(MetaDataCreateIndexService.class); + private static final DeprecationLogger deprecationLogger = new DeprecationLogger(logger); public static final int MAX_INDEX_NAME_BYTES = 255; diff --git a/server/src/main/java/org/elasticsearch/cluster/metadata/MetaDataIndexStateService.java b/server/src/main/java/org/elasticsearch/cluster/metadata/MetaDataIndexStateService.java index 4849b2e36200b..6badfd6ef586a 100644 --- a/server/src/main/java/org/elasticsearch/cluster/metadata/MetaDataIndexStateService.java +++ b/server/src/main/java/org/elasticsearch/cluster/metadata/MetaDataIndexStateService.java @@ -19,6 +19,8 @@ package org.elasticsearch.cluster.metadata; +import org.apache.logging.log4j.Logger; +import org.apache.logging.log4j.LogManager; import org.elasticsearch.ElasticsearchException; import org.elasticsearch.Version; import org.elasticsearch.action.ActionListener; @@ -59,6 +61,8 @@ * Service responsible for submitting open/close index requests */ public class MetaDataIndexStateService extends AbstractComponent { + private static final Logger logger = LogManager.getLogger(MetaDataIndexStateService.class); + private static final DeprecationLogger deprecationLogger = new DeprecationLogger(logger); public static final ClusterBlock INDEX_CLOSED_BLOCK = new ClusterBlock(4, "index closed", false, false, false, RestStatus.FORBIDDEN, ClusterBlockLevel.READ_WRITE); diff --git a/server/src/main/java/org/elasticsearch/cluster/metadata/MetaDataUpdateSettingsService.java b/server/src/main/java/org/elasticsearch/cluster/metadata/MetaDataUpdateSettingsService.java index 9dbe8c6773bfa..b2bc082f2846b 100644 --- a/server/src/main/java/org/elasticsearch/cluster/metadata/MetaDataUpdateSettingsService.java +++ b/server/src/main/java/org/elasticsearch/cluster/metadata/MetaDataUpdateSettingsService.java @@ -19,6 +19,8 @@ package org.elasticsearch.cluster.metadata; +import org.apache.logging.log4j.Logger; +import org.apache.logging.log4j.LogManager; import org.elasticsearch.ExceptionsHelper; import org.elasticsearch.Version; import org.elasticsearch.action.ActionListener; @@ -37,6 +39,7 @@ import org.elasticsearch.common.collect.Tuple; import org.elasticsearch.common.component.AbstractComponent; import org.elasticsearch.common.inject.Inject; +import org.elasticsearch.common.logging.DeprecationLogger; import org.elasticsearch.common.regex.Regex; import org.elasticsearch.common.settings.IndexScopedSettings; import org.elasticsearch.common.settings.Setting; @@ -60,6 +63,8 @@ * Service responsible for submitting update index settings requests */ public class MetaDataUpdateSettingsService extends AbstractComponent { + private static final Logger logger = LogManager.getLogger(MetaDataUpdateSettingsService.class); + private static final DeprecationLogger deprecationLogger = new DeprecationLogger(logger); private final ClusterService clusterService; diff --git a/server/src/main/java/org/elasticsearch/cluster/routing/OperationRouting.java b/server/src/main/java/org/elasticsearch/cluster/routing/OperationRouting.java index 8a0fbdaa07945..6eb60b7b55254 100644 --- a/server/src/main/java/org/elasticsearch/cluster/routing/OperationRouting.java +++ b/server/src/main/java/org/elasticsearch/cluster/routing/OperationRouting.java @@ -19,6 +19,8 @@ package org.elasticsearch.cluster.routing; +import org.apache.logging.log4j.Logger; +import org.apache.logging.log4j.LogManager; import org.elasticsearch.Version; import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.cluster.metadata.IndexMetaData; @@ -27,6 +29,7 @@ import org.elasticsearch.common.Nullable; import org.elasticsearch.common.Strings; import org.elasticsearch.common.component.AbstractComponent; +import org.elasticsearch.common.logging.DeprecationLogger; import org.elasticsearch.common.settings.ClusterSettings; import org.elasticsearch.common.settings.Setting; import org.elasticsearch.common.settings.Settings; @@ -45,6 +48,8 @@ import java.util.stream.Collectors; public class OperationRouting extends AbstractComponent { + private static final Logger logger = LogManager.getLogger(OperationRouting.class); + private static final DeprecationLogger deprecationLogger = new DeprecationLogger(logger); public static final Setting USE_ADAPTIVE_REPLICA_SELECTION_SETTING = Setting.boolSetting("cluster.routing.use_adaptive_replica_selection", false, diff --git a/server/src/main/java/org/elasticsearch/common/component/AbstractComponent.java b/server/src/main/java/org/elasticsearch/common/component/AbstractComponent.java index f8fc84e97ec60..bbcb4b9ec4209 100644 --- a/server/src/main/java/org/elasticsearch/common/component/AbstractComponent.java +++ b/server/src/main/java/org/elasticsearch/common/component/AbstractComponent.java @@ -19,20 +19,17 @@ package org.elasticsearch.common.component; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import org.elasticsearch.common.logging.DeprecationLogger; +import org.apache.logging.log4j.LogManager; import org.elasticsearch.common.settings.Settings; public abstract class AbstractComponent { protected final Logger logger; - protected final DeprecationLogger deprecationLogger; protected final Settings settings; public AbstractComponent(Settings settings) { this.logger = LogManager.getLogger(getClass()); - this.deprecationLogger = new DeprecationLogger(logger); this.settings = settings; } } diff --git a/server/src/main/java/org/elasticsearch/discovery/zen/FileBasedUnicastHostsProvider.java b/server/src/main/java/org/elasticsearch/discovery/zen/FileBasedUnicastHostsProvider.java index f339ae43a703e..43caf418665cc 100644 --- a/server/src/main/java/org/elasticsearch/discovery/zen/FileBasedUnicastHostsProvider.java +++ b/server/src/main/java/org/elasticsearch/discovery/zen/FileBasedUnicastHostsProvider.java @@ -19,8 +19,11 @@ package org.elasticsearch.discovery.zen; +import org.apache.logging.log4j.Logger; +import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.message.ParameterizedMessage; import org.elasticsearch.common.component.AbstractComponent; +import org.elasticsearch.common.logging.DeprecationLogger; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.transport.TransportAddress; @@ -45,6 +48,8 @@ * 67.81.244.15:9400 */ public class FileBasedUnicastHostsProvider extends AbstractComponent implements UnicastHostsProvider { + private static final Logger logger = LogManager.getLogger(FileBasedUnicastHostsProvider.class); + private static final DeprecationLogger deprecationLogger = new DeprecationLogger(logger); public static final String UNICAST_HOSTS_FILE = "unicast_hosts.txt"; diff --git a/server/src/main/java/org/elasticsearch/rest/action/RestFieldCapabilitiesAction.java b/server/src/main/java/org/elasticsearch/rest/action/RestFieldCapabilitiesAction.java index 28e10c6e54325..d68c0742685fa 100644 --- a/server/src/main/java/org/elasticsearch/rest/action/RestFieldCapabilitiesAction.java +++ b/server/src/main/java/org/elasticsearch/rest/action/RestFieldCapabilitiesAction.java @@ -19,10 +19,13 @@ package org.elasticsearch.rest.action; +import org.apache.logging.log4j.Logger; +import org.apache.logging.log4j.LogManager; import org.elasticsearch.action.fieldcaps.FieldCapabilitiesRequest; import org.elasticsearch.action.support.IndicesOptions; import org.elasticsearch.client.node.NodeClient; import org.elasticsearch.common.Strings; +import org.elasticsearch.common.logging.DeprecationLogger; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.rest.BaseRestHandler; @@ -35,6 +38,9 @@ import static org.elasticsearch.rest.RestRequest.Method.POST; public class RestFieldCapabilitiesAction extends BaseRestHandler { + private static final Logger logger = LogManager.getLogger(RestFieldCapabilitiesAction.class); + private static final DeprecationLogger deprecationLogger = new DeprecationLogger(logger); + public RestFieldCapabilitiesAction(Settings settings, RestController controller) { super(settings); controller.registerHandler(GET, "/_field_caps", this); diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestNodesStatsAction.java b/server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestNodesStatsAction.java index 624f7d1b9dcda..af2bbd2afc8d6 100644 --- a/server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestNodesStatsAction.java +++ b/server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestNodesStatsAction.java @@ -19,11 +19,14 @@ package org.elasticsearch.rest.action.admin.cluster; +import org.apache.logging.log4j.Logger; +import org.apache.logging.log4j.LogManager; import org.elasticsearch.action.admin.cluster.node.stats.NodesStatsRequest; import org.elasticsearch.action.admin.indices.stats.CommonStatsFlags; import org.elasticsearch.action.admin.indices.stats.CommonStatsFlags.Flag; import org.elasticsearch.client.node.NodeClient; import org.elasticsearch.common.Strings; +import org.elasticsearch.common.logging.DeprecationLogger; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.rest.BaseRestHandler; import org.elasticsearch.rest.RestController; @@ -42,6 +45,9 @@ import static org.elasticsearch.rest.RestRequest.Method.GET; public class RestNodesStatsAction extends BaseRestHandler { + private static final Logger logger = LogManager.getLogger(RestNodesStatsAction.class); + private static final DeprecationLogger deprecationLogger = new DeprecationLogger(logger); + public RestNodesStatsAction(Settings settings, RestController controller) { super(settings); controller.registerHandler(GET, "/_nodes/stats", this); diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestGetMappingAction.java b/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestGetMappingAction.java index 571c8c12c5f33..bf3c3a5fa6029 100644 --- a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestGetMappingAction.java +++ b/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestGetMappingAction.java @@ -20,6 +20,8 @@ package org.elasticsearch.rest.action.admin.indices; import com.carrotsearch.hppc.cursors.ObjectCursor; +import org.apache.logging.log4j.Logger; +import org.apache.logging.log4j.LogManager; import org.elasticsearch.action.admin.indices.mapping.get.GetMappingsRequest; import org.elasticsearch.action.admin.indices.mapping.get.GetMappingsResponse; import org.elasticsearch.action.support.IndicesOptions; @@ -27,6 +29,7 @@ import org.elasticsearch.cluster.metadata.MappingMetaData; import org.elasticsearch.common.Strings; import org.elasticsearch.common.collect.ImmutableOpenMap; +import org.elasticsearch.common.logging.DeprecationLogger; import org.elasticsearch.common.regex.Regex; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.util.set.Sets; @@ -55,6 +58,8 @@ import static org.elasticsearch.rest.RestRequest.Method.HEAD; public class RestGetMappingAction extends BaseRestHandler { + private static final Logger logger = LogManager.getLogger(RestGetMappingAction.class); + private static final DeprecationLogger deprecationLogger = new DeprecationLogger(logger); public RestGetMappingAction(final Settings settings, final RestController controller) { super(settings); diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestIndicesStatsAction.java b/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestIndicesStatsAction.java index f868a8d6c4397..272dd63a6a056 100644 --- a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestIndicesStatsAction.java +++ b/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestIndicesStatsAction.java @@ -19,10 +19,13 @@ package org.elasticsearch.rest.action.admin.indices; +import org.apache.logging.log4j.Logger; +import org.apache.logging.log4j.LogManager; import org.elasticsearch.action.admin.indices.stats.IndicesStatsRequest; import org.elasticsearch.action.support.IndicesOptions; import org.elasticsearch.client.node.NodeClient; import org.elasticsearch.common.Strings; +import org.elasticsearch.common.logging.DeprecationLogger; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.rest.BaseRestHandler; import org.elasticsearch.rest.RestController; @@ -41,6 +44,9 @@ import static org.elasticsearch.rest.RestRequest.Method.GET; public class RestIndicesStatsAction extends BaseRestHandler { + private static final Logger logger = LogManager.getLogger(RestIndicesStatsAction.class); + private static final DeprecationLogger deprecationLogger = new DeprecationLogger(logger); + public RestIndicesStatsAction(Settings settings, RestController controller) { super(settings); controller.registerHandler(GET, "/_stats", this); diff --git a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestResizeHandler.java b/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestResizeHandler.java index bc5db552b9dd2..fb40416b16986 100644 --- a/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestResizeHandler.java +++ b/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestResizeHandler.java @@ -19,11 +19,14 @@ package org.elasticsearch.rest.action.admin.indices; +import org.apache.logging.log4j.Logger; +import org.apache.logging.log4j.LogManager; import org.elasticsearch.action.admin.indices.shrink.ResizeRequest; import org.elasticsearch.action.admin.indices.shrink.ResizeType; import org.elasticsearch.action.support.ActiveShardCount; import org.elasticsearch.client.node.NodeClient; import org.elasticsearch.common.Booleans; +import org.elasticsearch.common.logging.DeprecationLogger; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.rest.BaseRestHandler; import org.elasticsearch.rest.RestController; @@ -33,6 +36,8 @@ import java.io.IOException; public abstract class RestResizeHandler extends BaseRestHandler { + private static final Logger logger = LogManager.getLogger(RestResizeHandler.class); + private static final DeprecationLogger deprecationLogger = new DeprecationLogger(logger); RestResizeHandler(final Settings settings) { super(settings); diff --git a/x-pack/plugin/core/src/main/java/org/elasticsearch/license/RestDeleteLicenseAction.java b/x-pack/plugin/core/src/main/java/org/elasticsearch/license/RestDeleteLicenseAction.java index 68bc0c31968e9..62e49fcf675b3 100644 --- a/x-pack/plugin/core/src/main/java/org/elasticsearch/license/RestDeleteLicenseAction.java +++ b/x-pack/plugin/core/src/main/java/org/elasticsearch/license/RestDeleteLicenseAction.java @@ -5,6 +5,9 @@ */ package org.elasticsearch.license; +import org.apache.logging.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.elasticsearch.common.logging.DeprecationLogger; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.protocol.xpack.license.DeleteLicenseRequest; import org.elasticsearch.rest.RestController; @@ -18,6 +21,9 @@ import static org.elasticsearch.rest.RestRequest.Method.DELETE; public class RestDeleteLicenseAction extends XPackRestHandler { + private static final Logger logger = LogManager.getLogger(RestDeleteLicenseAction.class); + private static final DeprecationLogger deprecationLogger = new DeprecationLogger(logger); + public RestDeleteLicenseAction(Settings settings, RestController controller) { super(settings); // @deprecated Remove deprecations in 6.0 diff --git a/x-pack/plugin/core/src/main/java/org/elasticsearch/license/RestGetLicenseAction.java b/x-pack/plugin/core/src/main/java/org/elasticsearch/license/RestGetLicenseAction.java index 086c24a4917e6..70f1748bed73e 100644 --- a/x-pack/plugin/core/src/main/java/org/elasticsearch/license/RestGetLicenseAction.java +++ b/x-pack/plugin/core/src/main/java/org/elasticsearch/license/RestGetLicenseAction.java @@ -5,7 +5,9 @@ */ package org.elasticsearch.license; -import org.elasticsearch.common.inject.Inject; +import org.apache.logging.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.elasticsearch.common.logging.DeprecationLogger; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.xcontent.ToXContent; import org.elasticsearch.common.xcontent.XContentBuilder; @@ -27,8 +29,9 @@ import static org.elasticsearch.rest.RestStatus.OK; public class RestGetLicenseAction extends XPackRestHandler { + private static final Logger logger = LogManager.getLogger(RestGetLicenseAction.class); + private static final DeprecationLogger deprecationLogger = new DeprecationLogger(logger); - @Inject public RestGetLicenseAction(Settings settings, RestController controller) { super(settings); // @deprecated Remove deprecations in 6.0 diff --git a/x-pack/plugin/core/src/main/java/org/elasticsearch/license/RestPutLicenseAction.java b/x-pack/plugin/core/src/main/java/org/elasticsearch/license/RestPutLicenseAction.java index 756a1a8856411..7b79ceedbfaa2 100644 --- a/x-pack/plugin/core/src/main/java/org/elasticsearch/license/RestPutLicenseAction.java +++ b/x-pack/plugin/core/src/main/java/org/elasticsearch/license/RestPutLicenseAction.java @@ -5,6 +5,9 @@ */ package org.elasticsearch.license; +import org.apache.logging.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.elasticsearch.common.logging.DeprecationLogger; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.rest.RestController; import org.elasticsearch.rest.RestRequest; @@ -18,6 +21,9 @@ import static org.elasticsearch.rest.RestRequest.Method.PUT; public class RestPutLicenseAction extends XPackRestHandler { + private static final Logger logger = LogManager.getLogger(RestPutLicenseAction.class); + private static final DeprecationLogger deprecationLogger = new DeprecationLogger(logger); + public RestPutLicenseAction(Settings settings, RestController controller) { super(settings); // @deprecated Remove deprecations in 6.0 diff --git a/x-pack/plugin/graph/src/main/java/org/elasticsearch/xpack/graph/rest/action/RestGraphAction.java b/x-pack/plugin/graph/src/main/java/org/elasticsearch/xpack/graph/rest/action/RestGraphAction.java index 778eb261a0705..4c1711f4214e3 100644 --- a/x-pack/plugin/graph/src/main/java/org/elasticsearch/xpack/graph/rest/action/RestGraphAction.java +++ b/x-pack/plugin/graph/src/main/java/org/elasticsearch/xpack/graph/rest/action/RestGraphAction.java @@ -5,10 +5,13 @@ */ package org.elasticsearch.xpack.graph.rest.action; +import org.apache.logging.log4j.Logger; +import org.apache.logging.log4j.LogManager; import org.elasticsearch.ElasticsearchParseException; import org.elasticsearch.action.support.IndicesOptions; import org.elasticsearch.common.ParseField; import org.elasticsearch.common.Strings; +import org.elasticsearch.common.logging.DeprecationLogger; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.common.xcontent.XContentParser; @@ -31,10 +34,14 @@ import static org.elasticsearch.rest.RestRequest.Method.GET; import static org.elasticsearch.rest.RestRequest.Method.POST; import static org.elasticsearch.xpack.core.graph.action.GraphExploreAction.INSTANCE; + /** * @see GraphExploreRequest */ public class RestGraphAction extends XPackRestHandler { + private static final Logger logger = LogManager.getLogger(RestGraphAction.class); + private static final DeprecationLogger deprecationLogger = new DeprecationLogger(logger); + public static final ParseField TIMEOUT_FIELD = new ParseField("timeout"); public static final ParseField SIGNIFICANCE_FIELD = new ParseField("use_significance"); public static final ParseField RETURN_DETAILED_INFO = new ParseField("return_detailed_stats"); diff --git a/x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/RestAuthenticateAction.java b/x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/RestAuthenticateAction.java index 62e906aed0fe7..4afc007107860 100644 --- a/x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/RestAuthenticateAction.java +++ b/x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/RestAuthenticateAction.java @@ -5,7 +5,10 @@ */ package org.elasticsearch.xpack.security.rest.action; +import org.apache.logging.log4j.Logger; +import org.apache.logging.log4j.LogManager; import org.elasticsearch.client.node.NodeClient; +import org.elasticsearch.common.logging.DeprecationLogger; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.xcontent.ToXContent; import org.elasticsearch.common.xcontent.XContentBuilder; @@ -27,6 +30,8 @@ import static org.elasticsearch.rest.RestRequest.Method.GET; public class RestAuthenticateAction extends SecurityBaseRestHandler { + private static final Logger logger = LogManager.getLogger(RestAuthenticateAction.class); + private static final DeprecationLogger deprecationLogger = new DeprecationLogger(logger); private final SecurityContext securityContext; diff --git a/x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/realm/RestClearRealmCacheAction.java b/x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/realm/RestClearRealmCacheAction.java index a477f7bf371f1..09af866dc4aad 100644 --- a/x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/realm/RestClearRealmCacheAction.java +++ b/x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/realm/RestClearRealmCacheAction.java @@ -5,7 +5,10 @@ */ package org.elasticsearch.xpack.security.rest.action.realm; +import org.apache.logging.log4j.Logger; +import org.apache.logging.log4j.LogManager; import org.elasticsearch.client.node.NodeClient; +import org.elasticsearch.common.logging.DeprecationLogger; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.license.XPackLicenseState; import org.elasticsearch.rest.RestController; @@ -20,6 +23,8 @@ import static org.elasticsearch.rest.RestRequest.Method.POST; public final class RestClearRealmCacheAction extends SecurityBaseRestHandler { + private static final Logger logger = LogManager.getLogger(RestClearRealmCacheAction.class); + private static final DeprecationLogger deprecationLogger = new DeprecationLogger(logger); public RestClearRealmCacheAction(Settings settings, RestController controller, XPackLicenseState licenseState) { super(settings, licenseState); diff --git a/x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/role/RestClearRolesCacheAction.java b/x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/role/RestClearRolesCacheAction.java index 1834c84512465..0965ff4d17647 100644 --- a/x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/role/RestClearRolesCacheAction.java +++ b/x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/role/RestClearRolesCacheAction.java @@ -5,7 +5,10 @@ */ package org.elasticsearch.xpack.security.rest.action.role; +import org.apache.logging.log4j.Logger; +import org.apache.logging.log4j.LogManager; import org.elasticsearch.client.node.NodeClient; +import org.elasticsearch.common.logging.DeprecationLogger; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.license.XPackLicenseState; import org.elasticsearch.rest.RestController; @@ -20,6 +23,8 @@ import static org.elasticsearch.rest.RestRequest.Method.POST; public final class RestClearRolesCacheAction extends SecurityBaseRestHandler { + private static final Logger logger = LogManager.getLogger(RestClearRolesCacheAction.class); + private static final DeprecationLogger deprecationLogger = new DeprecationLogger(logger); public RestClearRolesCacheAction(Settings settings, RestController controller, XPackLicenseState licenseState) { super(settings, licenseState); diff --git a/x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/role/RestDeleteRoleAction.java b/x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/role/RestDeleteRoleAction.java index 8de74a2868eea..16f203e37cda3 100644 --- a/x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/role/RestDeleteRoleAction.java +++ b/x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/role/RestDeleteRoleAction.java @@ -5,7 +5,10 @@ */ package org.elasticsearch.xpack.security.rest.action.role; +import org.apache.logging.log4j.Logger; +import org.apache.logging.log4j.LogManager; import org.elasticsearch.client.node.NodeClient; +import org.elasticsearch.common.logging.DeprecationLogger; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.license.XPackLicenseState; @@ -27,6 +30,8 @@ * Rest endpoint to delete a Role from the security index */ public class RestDeleteRoleAction extends SecurityBaseRestHandler { + private static final Logger logger = LogManager.getLogger(RestDeleteRoleAction.class); + private static final DeprecationLogger deprecationLogger = new DeprecationLogger(logger); public RestDeleteRoleAction(Settings settings, RestController controller, XPackLicenseState licenseState) { super(settings, licenseState); diff --git a/x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/role/RestGetRolesAction.java b/x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/role/RestGetRolesAction.java index c582c3d962eba..2130a8f6b6894 100644 --- a/x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/role/RestGetRolesAction.java +++ b/x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/role/RestGetRolesAction.java @@ -5,8 +5,11 @@ */ package org.elasticsearch.xpack.security.rest.action.role; +import org.apache.logging.log4j.Logger; +import org.apache.logging.log4j.LogManager; import org.elasticsearch.client.node.NodeClient; import org.elasticsearch.common.Strings; +import org.elasticsearch.common.logging.DeprecationLogger; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.license.XPackLicenseState; @@ -29,6 +32,9 @@ * Rest endpoint to retrieve a Role from the security index */ public class RestGetRolesAction extends SecurityBaseRestHandler { + private static final Logger logger = LogManager.getLogger(RestGetRolesAction.class); + private static final DeprecationLogger deprecationLogger = new DeprecationLogger(logger); + public RestGetRolesAction(Settings settings, RestController controller, XPackLicenseState licenseState) { super(settings, licenseState); controller.registerHandler(GET, "/_xpack/security/role/", this); diff --git a/x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/role/RestPutRoleAction.java b/x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/role/RestPutRoleAction.java index 422db10db3538..07f0a70aed2dd 100644 --- a/x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/role/RestPutRoleAction.java +++ b/x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/role/RestPutRoleAction.java @@ -5,7 +5,10 @@ */ package org.elasticsearch.xpack.security.rest.action.role; +import org.apache.logging.log4j.Logger; +import org.apache.logging.log4j.LogManager; import org.elasticsearch.client.node.NodeClient; +import org.elasticsearch.common.logging.DeprecationLogger; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.license.XPackLicenseState; @@ -29,6 +32,8 @@ * Rest endpoint to add a Role to the security index */ public class RestPutRoleAction extends SecurityBaseRestHandler { + private static final Logger logger = LogManager.getLogger(RestPutRoleAction.class); + private static final DeprecationLogger deprecationLogger = new DeprecationLogger(logger); public RestPutRoleAction(Settings settings, RestController controller, XPackLicenseState licenseState) { super(settings, licenseState); diff --git a/x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/user/RestDeleteUserAction.java b/x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/user/RestDeleteUserAction.java index 803672f7a3ca2..fda76a38bc566 100644 --- a/x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/user/RestDeleteUserAction.java +++ b/x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/user/RestDeleteUserAction.java @@ -5,7 +5,10 @@ */ package org.elasticsearch.xpack.security.rest.action.user; +import org.apache.logging.log4j.Logger; +import org.apache.logging.log4j.LogManager; import org.elasticsearch.client.node.NodeClient; +import org.elasticsearch.common.logging.DeprecationLogger; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.license.XPackLicenseState; @@ -27,6 +30,8 @@ * Rest action to delete a user from the security index */ public class RestDeleteUserAction extends SecurityBaseRestHandler { + private static final Logger logger = LogManager.getLogger(RestDeleteUserAction.class); + private static final DeprecationLogger deprecationLogger = new DeprecationLogger(logger); public RestDeleteUserAction(Settings settings, RestController controller, XPackLicenseState licenseState) { super(settings, licenseState); diff --git a/x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/user/RestGetUsersAction.java b/x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/user/RestGetUsersAction.java index 2f5ebbf479a59..a55f49e263cf9 100644 --- a/x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/user/RestGetUsersAction.java +++ b/x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/user/RestGetUsersAction.java @@ -5,8 +5,11 @@ */ package org.elasticsearch.xpack.security.rest.action.user; +import org.apache.logging.log4j.Logger; +import org.apache.logging.log4j.LogManager; import org.elasticsearch.client.node.NodeClient; import org.elasticsearch.common.Strings; +import org.elasticsearch.common.logging.DeprecationLogger; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.license.XPackLicenseState; @@ -29,6 +32,8 @@ * Rest action to retrieve a user from the security index */ public class RestGetUsersAction extends SecurityBaseRestHandler { + private static final Logger logger = LogManager.getLogger(RestGetUsersAction.class); + private static final DeprecationLogger deprecationLogger = new DeprecationLogger(logger); public RestGetUsersAction(Settings settings, RestController controller, XPackLicenseState licenseState) { super(settings, licenseState); diff --git a/x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/user/RestPutUserAction.java b/x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/user/RestPutUserAction.java index 7a426614e1b4f..3a4cb122eb495 100644 --- a/x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/user/RestPutUserAction.java +++ b/x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/rest/action/user/RestPutUserAction.java @@ -5,7 +5,10 @@ */ package org.elasticsearch.xpack.security.rest.action.user; +import org.apache.logging.log4j.Logger; +import org.apache.logging.log4j.LogManager; import org.elasticsearch.client.node.NodeClient; +import org.elasticsearch.common.logging.DeprecationLogger; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.util.set.Sets; import org.elasticsearch.common.xcontent.XContentBuilder; @@ -35,6 +38,8 @@ * Rest endpoint to add a User to the security index */ public class RestPutUserAction extends SecurityBaseRestHandler implements RestRequestFilter { + private static final Logger logger = LogManager.getLogger(RestPutUserAction.class); + private static final DeprecationLogger deprecationLogger = new DeprecationLogger(logger); private final Hasher passwordHasher = Hasher.resolve(XPackSettings.PASSWORD_HASHING_ALGORITHM.get(settings)); diff --git a/x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/transport/netty4/SecurityNetty4HttpServerTransport.java b/x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/transport/netty4/SecurityNetty4HttpServerTransport.java index b79f731600371..039c7fa526917 100644 --- a/x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/transport/netty4/SecurityNetty4HttpServerTransport.java +++ b/x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/transport/netty4/SecurityNetty4HttpServerTransport.java @@ -9,6 +9,8 @@ import io.netty.channel.ChannelHandler; import io.netty.channel.ChannelHandlerContext; import io.netty.handler.ssl.SslHandler; +import org.apache.logging.log4j.Logger; +import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.message.ParameterizedMessage; import org.elasticsearch.ExceptionsHelper; import org.elasticsearch.common.network.NetworkService; @@ -30,6 +32,7 @@ import static org.elasticsearch.xpack.core.security.transport.SSLExceptionHelper.isReceivedCertificateUnknownException; public class SecurityNetty4HttpServerTransport extends Netty4HttpServerTransport { + private static final Logger logger = LogManager.getLogger(SecurityNetty4HttpServerTransport.class); private final IPFilter ipFilter; private final SSLService sslService; diff --git a/x-pack/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestAckWatchAction.java b/x-pack/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestAckWatchAction.java index 5446d9251a14a..491d3ca9077bc 100644 --- a/x-pack/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestAckWatchAction.java +++ b/x-pack/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestAckWatchAction.java @@ -5,6 +5,9 @@ */ package org.elasticsearch.xpack.watcher.rest.action; +import org.apache.logging.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.elasticsearch.common.logging.DeprecationLogger; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.rest.BytesRestResponse; @@ -29,6 +32,9 @@ * The rest action to ack a watch */ public class RestAckWatchAction extends WatcherRestHandler { + private static final Logger logger = LogManager.getLogger(RestAckWatchAction.class); + private static final DeprecationLogger deprecationLogger = new DeprecationLogger(logger); + public RestAckWatchAction(Settings settings, RestController controller) { super(settings); // @deprecated Remove deprecations in 6.0 diff --git a/x-pack/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestActivateWatchAction.java b/x-pack/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestActivateWatchAction.java index ef3d91f72704d..5afd0976eb9a5 100644 --- a/x-pack/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestActivateWatchAction.java +++ b/x-pack/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestActivateWatchAction.java @@ -5,6 +5,9 @@ */ package org.elasticsearch.xpack.watcher.rest.action; +import org.apache.logging.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.elasticsearch.common.logging.DeprecationLogger; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.rest.BytesRestResponse; @@ -29,6 +32,9 @@ * The rest action to de/activate a watch */ public class RestActivateWatchAction extends WatcherRestHandler { + private static final Logger logger = LogManager.getLogger(RestActivateWatchAction.class); + private static final DeprecationLogger deprecationLogger = new DeprecationLogger(logger); + public RestActivateWatchAction(Settings settings, RestController controller) { super(settings); diff --git a/x-pack/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestDeleteWatchAction.java b/x-pack/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestDeleteWatchAction.java index 22577a5fe85db..f087f24791414 100644 --- a/x-pack/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestDeleteWatchAction.java +++ b/x-pack/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestDeleteWatchAction.java @@ -5,6 +5,9 @@ */ package org.elasticsearch.xpack.watcher.rest.action; +import org.apache.logging.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.elasticsearch.common.logging.DeprecationLogger; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.rest.BytesRestResponse; @@ -25,6 +28,9 @@ import static org.elasticsearch.rest.RestStatus.OK; public class RestDeleteWatchAction extends WatcherRestHandler { + private static final Logger logger = LogManager.getLogger(RestDeleteWatchAction.class); + private static final DeprecationLogger deprecationLogger = new DeprecationLogger(logger); + public RestDeleteWatchAction(Settings settings, RestController controller) { super(settings); // @deprecated Remove deprecations in 6.0 diff --git a/x-pack/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestExecuteWatchAction.java b/x-pack/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestExecuteWatchAction.java index 8c5748beef921..f32d62cd2b128 100644 --- a/x-pack/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestExecuteWatchAction.java +++ b/x-pack/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestExecuteWatchAction.java @@ -5,9 +5,12 @@ */ package org.elasticsearch.xpack.watcher.rest.action; +import org.apache.logging.log4j.Logger; +import org.apache.logging.log4j.LogManager; import org.elasticsearch.ElasticsearchParseException; import org.elasticsearch.common.ParseField; import org.elasticsearch.common.bytes.BytesReference; +import org.elasticsearch.common.logging.DeprecationLogger; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.util.set.Sets; import org.elasticsearch.common.xcontent.XContentBuilder; @@ -40,6 +43,8 @@ import static org.elasticsearch.xpack.watcher.rest.action.RestExecuteWatchAction.Field.RECORD_EXECUTION; public class RestExecuteWatchAction extends WatcherRestHandler implements RestRequestFilter { + private static final Logger logger = LogManager.getLogger(RestExecuteWatchAction.class); + private static final DeprecationLogger deprecationLogger = new DeprecationLogger(logger); private static final List RESERVED_FIELD_NAMES = Arrays.asList(WatchField.TRIGGER.getPreferredName(), WatchField.INPUT.getPreferredName(), WatchField.CONDITION.getPreferredName(), diff --git a/x-pack/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestGetWatchAction.java b/x-pack/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestGetWatchAction.java index 0199d184d098e..a50096c713933 100644 --- a/x-pack/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestGetWatchAction.java +++ b/x-pack/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestGetWatchAction.java @@ -5,6 +5,9 @@ */ package org.elasticsearch.xpack.watcher.rest.action; +import org.apache.logging.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.elasticsearch.common.logging.DeprecationLogger; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.xcontent.ToXContent; import org.elasticsearch.common.xcontent.XContentBuilder; @@ -25,6 +28,9 @@ import static org.elasticsearch.rest.RestStatus.OK; public class RestGetWatchAction extends WatcherRestHandler { + private static final Logger logger = LogManager.getLogger(RestGetWatchAction.class); + private static final DeprecationLogger deprecationLogger = new DeprecationLogger(logger); + public RestGetWatchAction(Settings settings, RestController controller) { super(settings); diff --git a/x-pack/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestPutWatchAction.java b/x-pack/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestPutWatchAction.java index 9dbd2a68f068c..814c8aed962b1 100644 --- a/x-pack/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestPutWatchAction.java +++ b/x-pack/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestPutWatchAction.java @@ -5,6 +5,9 @@ */ package org.elasticsearch.xpack.watcher.rest.action; +import org.apache.logging.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.elasticsearch.common.logging.DeprecationLogger; import org.elasticsearch.common.lucene.uid.Versions; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.util.set.Sets; @@ -31,6 +34,8 @@ import static org.elasticsearch.rest.RestStatus.OK; public class RestPutWatchAction extends WatcherRestHandler implements RestRequestFilter { + private static final Logger logger = LogManager.getLogger(RestPutWatchAction.class); + private static final DeprecationLogger deprecationLogger = new DeprecationLogger(logger); public RestPutWatchAction(Settings settings, RestController controller) { super(settings); diff --git a/x-pack/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestWatchServiceAction.java b/x-pack/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestWatchServiceAction.java index 209e86baa6c87..ce30cb7a43c93 100644 --- a/x-pack/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestWatchServiceAction.java +++ b/x-pack/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestWatchServiceAction.java @@ -5,7 +5,10 @@ */ package org.elasticsearch.xpack.watcher.rest.action; +import org.apache.logging.log4j.Logger; +import org.apache.logging.log4j.LogManager; import org.elasticsearch.action.ActionListener; +import org.elasticsearch.common.logging.DeprecationLogger; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.rest.BytesRestResponse; import org.elasticsearch.rest.RestController; @@ -19,6 +22,8 @@ import static org.elasticsearch.rest.RestRequest.Method.PUT; public class RestWatchServiceAction extends WatcherRestHandler { + private static final Logger logger = LogManager.getLogger(RestWatchServiceAction.class); + private static final DeprecationLogger deprecationLogger = new DeprecationLogger(logger); public RestWatchServiceAction(Settings settings, RestController controller) { super(settings); diff --git a/x-pack/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestWatcherStatsAction.java b/x-pack/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestWatcherStatsAction.java index bc9b77fbb01ea..9f6aaa05ef7a7 100644 --- a/x-pack/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestWatcherStatsAction.java +++ b/x-pack/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/rest/action/RestWatcherStatsAction.java @@ -5,7 +5,10 @@ */ package org.elasticsearch.xpack.watcher.rest.action; +import org.apache.logging.log4j.Logger; +import org.apache.logging.log4j.LogManager; import org.elasticsearch.common.Strings; +import org.elasticsearch.common.logging.DeprecationLogger; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.rest.RestController; import org.elasticsearch.rest.RestRequest; @@ -21,6 +24,9 @@ import static org.elasticsearch.rest.RestRequest.Method.GET; public class RestWatcherStatsAction extends WatcherRestHandler { + private static final Logger logger = LogManager.getLogger(RestWatcherStatsAction.class); + private static final DeprecationLogger deprecationLogger = new DeprecationLogger(logger); + public RestWatcherStatsAction(Settings settings, RestController controller) { super(settings);