Class LoggingDeprecationHandler

java.lang.Object
org.elasticsearch.common.xcontent.LoggingDeprecationHandler
All Implemented Interfaces:
org.elasticsearch.xcontent.DeprecationHandler

public class LoggingDeprecationHandler extends Object implements org.elasticsearch.xcontent.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 Details

  • Method Details

    • logRenamedField

      public void logRenamedField(String parserName, Supplier<org.elasticsearch.xcontent.XContentLocation> location, String oldName, String currentName)
      Specified by:
      logRenamedField in interface org.elasticsearch.xcontent.DeprecationHandler
    • logReplacedField

      public void logReplacedField(String parserName, Supplier<org.elasticsearch.xcontent.XContentLocation> location, String oldName, String replacedName)
      Specified by:
      logReplacedField in interface org.elasticsearch.xcontent.DeprecationHandler
    • logRemovedField

      public void logRemovedField(String parserName, Supplier<org.elasticsearch.xcontent.XContentLocation> location, String removedName)
      Specified by:
      logRemovedField in interface org.elasticsearch.xcontent.DeprecationHandler
    • logRenamedField

      public void logRenamedField(String parserName, Supplier<org.elasticsearch.xcontent.XContentLocation> location, String oldName, String currentName, boolean isCompatibleDeprecation)
      Specified by:
      logRenamedField in interface org.elasticsearch.xcontent.DeprecationHandler
    • logReplacedField

      public void logReplacedField(String parserName, Supplier<org.elasticsearch.xcontent.XContentLocation> location, String oldName, String replacedName, boolean isCompatibleDeprecation)
      Specified by:
      logReplacedField in interface org.elasticsearch.xcontent.DeprecationHandler
    • logRemovedField

      public void logRemovedField(String parserName, Supplier<org.elasticsearch.xcontent.XContentLocation> location, String removedName, boolean isCompatibleDeprecation)
      Specified by:
      logRemovedField in interface org.elasticsearch.xcontent.DeprecationHandler