public interface JsonFactoryDecorator
JsonFactory used by a
AbstractCompositeJsonFormatter.
This allows you to customize the factory used by the formatters.
Implementations must be idempotent. The decorator configured on a formatter is called each time a formatter is started, and there is no way to 'un-decorate' the factory when when formatter is stopped. So, the factory could be decorated multiple times if the formatter is restarted.
| Modifier and Type | Method and Description |
|---|---|
default JsonFactory |
decorate(JsonFactory factory)
Decorates the given
JsonFactory. |
default JsonFactory decorate(JsonFactory factory)
JsonFactory.
By default, returns the given factory unchanged.
Note that the default JsonFactory created by logstash-logback-encoder
is a MappingJsonFactory, but can be changed by JsonFactoryDecorators
to any subclass of JsonFactory.
factory - the factory to decorateJsonFactoryCopyright © 2013–2021. All rights reserved.