Module org.elasticsearch.server
Class LoggingDeprecationHandler
java.lang.Object
org.elasticsearch.common.xcontent.LoggingDeprecationHandler
- All Implemented Interfaces:
DeprecationHandler
Logs deprecations to the
DeprecationLogger.
This is core's primary implementation of DeprecationHandler and
should absolutely be used everywhere where it parses
requests. It is much less appropriate when parsing responses from external
sources because it will report deprecated fields back to the user as
though the user sent them.
-
Field Summary
FieldsFields inherited from interface org.elasticsearch.xcontent.DeprecationHandler
IGNORE_DEPRECATIONS, THROW_UNSUPPORTED_OPERATION -
Method Summary
Modifier and TypeMethodDescriptionvoidlogRemovedField(String parserName, Supplier<XContentLocation> location, String removedName) voidlogRemovedField(String parserName, Supplier<XContentLocation> location, String removedName, boolean isCompatibleDeprecation) voidlogRenamedField(String parserName, Supplier<XContentLocation> location, String oldName, String currentName) voidlogRenamedField(String parserName, Supplier<XContentLocation> location, String oldName, String currentName, boolean isCompatibleDeprecation) voidlogReplacedField(String parserName, Supplier<XContentLocation> location, String oldName, String replacedName) voidlogReplacedField(String parserName, Supplier<XContentLocation> location, String oldName, String replacedName, boolean isCompatibleDeprecation)
-
Field Details
-
INSTANCE
-
-
Method Details
-
logRenamedField
public void logRenamedField(String parserName, Supplier<XContentLocation> location, String oldName, String currentName) - Specified by:
logRenamedFieldin interfaceDeprecationHandler
-
logReplacedField
public void logReplacedField(String parserName, Supplier<XContentLocation> location, String oldName, String replacedName) - Specified by:
logReplacedFieldin interfaceDeprecationHandler
-
logRemovedField
public void logRemovedField(String parserName, Supplier<XContentLocation> location, String removedName) - Specified by:
logRemovedFieldin interfaceDeprecationHandler
-
logRenamedField
public void logRenamedField(String parserName, Supplier<XContentLocation> location, String oldName, String currentName, boolean isCompatibleDeprecation) - Specified by:
logRenamedFieldin interfaceDeprecationHandler
-
logReplacedField
public void logReplacedField(String parserName, Supplier<XContentLocation> location, String oldName, String replacedName, boolean isCompatibleDeprecation) - Specified by:
logReplacedFieldin interfaceDeprecationHandler
-
logRemovedField
public void logRemovedField(String parserName, Supplier<XContentLocation> location, String removedName, boolean isCompatibleDeprecation) - Specified by:
logRemovedFieldin interfaceDeprecationHandler
-