Package net.logstash.logback.decorate
Class EscapeNonAsciiJsonFactoryDecorator
java.lang.Object
net.logstash.logback.decorate.EscapeNonAsciiJsonFactoryDecorator
- All Implemented Interfaces:
JsonFactoryDecorator
Enables the
JsonGenerator.Feature.ESCAPE_NON_ASCII
feature on the JsonFactory
.
Prior to 5.0, JsonGenerator.Feature.ESCAPE_NON_ASCII
was enabled by default.
In 5.0, the feature is disabled by default, and can be re-enabled with this decorator.-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
EscapeNonAsciiJsonFactoryDecorator
public EscapeNonAsciiJsonFactoryDecorator()
-
-
Method Details
-
decorate
Description copied from interface:JsonFactoryDecorator
Decorates the givenJsonFactory
.By default, returns the given factory unchanged.
Note that the default
JsonFactory
created by logstash-logback-encoder is aMappingJsonFactory
, but can be changed byJsonFactoryDecorator
s to any subclass ofJsonFactory
.- Specified by:
decorate
in interfaceJsonFactoryDecorator
- Parameters:
factory
- the factory to decorate- Returns:
- the decorated
JsonFactory
-