Class YamlFeatureJsonGeneratorDecorator

java.lang.Object
net.logstash.logback.decorate.FeatureDecorator<com.fasterxml.jackson.dataformat.yaml.YAMLGenerator,com.fasterxml.jackson.dataformat.yaml.YAMLGenerator.Feature>
net.logstash.logback.decorate.yaml.YamlFeatureJsonGeneratorDecorator
All Implemented Interfaces:
JsonGeneratorDecorator

public class YamlFeatureJsonGeneratorDecorator extends FeatureDecorator<com.fasterxml.jackson.dataformat.yaml.YAMLGenerator,com.fasterxml.jackson.dataformat.yaml.YAMLGenerator.Feature> implements JsonGeneratorDecorator
A JsonGeneratorDecorator that allows enabling/disabling of YAMLGenerator features.

Only valid for YAMLGenerators. Use in conjunction with YamlJsonFactoryDecorator.

  • Constructor Details

    • YamlFeatureJsonGeneratorDecorator

      public YamlFeatureJsonGeneratorDecorator()
  • Method Details

    • decorate

      public JsonGenerator decorate(JsonGenerator generator)
      Description copied from interface: JsonGeneratorDecorator
      Decorates the given generator, and returns the decorated generator.

      The returned decorator does not need to be the same object as the given generator.

      Specified by:
      decorate in interface JsonGeneratorDecorator
      Parameters:
      generator - the generator to decorate
      Returns:
      the decorated generator