Event - type of event (ILoggingEvent or IAccessEvent).public abstract class AbstractPatternJsonProvider<Event extends DeferredProcessingAware> extends AbstractJsonProvider<Event> implements JsonFactoryAware
AbstractJsonPatternParser that is to
parse the pattern specified.
Subclasses must implement createParser() method so it returns parser valid for a specified event class.| Modifier and Type | Field and Description |
|---|---|
protected JsonFactory |
jsonFactory |
context| Constructor and Description |
|---|
AbstractPatternJsonProvider() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract AbstractJsonPatternParser<Event> |
createParser() |
String |
getPattern() |
boolean |
isOmitEmptyFields()
When true, fields whose values are considered empty (
AbstractJsonPatternParser.isEmptyValue(Object)})
will be omitted from json output. |
void |
setJsonFactory(JsonFactory jsonFactory) |
void |
setOmitEmptyFields(boolean omitEmptyFields)
When true, fields whose values are considered empty (
AbstractJsonPatternParser.isEmptyValue(Object)})
will be omitted from json output. |
void |
setPattern(String pattern) |
void |
writeTo(JsonGenerator generator,
Event event)
Writes information about the event,
to the given generator.
|
isStarted, prepareForDeferredProcessing, start, stopaddError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContextclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, setContextprotected JsonFactory jsonFactory
public void writeTo(JsonGenerator generator, Event event) throws IOException
JsonProviderwriteTo in interface JsonProvider<Event extends DeferredProcessingAware>IOExceptionprotected abstract AbstractJsonPatternParser<Event> createParser()
public String getPattern()
public void setPattern(String pattern)
public void setJsonFactory(JsonFactory jsonFactory)
setJsonFactory in interface JsonFactoryAwarepublic boolean isOmitEmptyFields()
AbstractJsonPatternParser.isEmptyValue(Object)})
will be omitted from json output.public void setOmitEmptyFields(boolean omitEmptyFields)
AbstractJsonPatternParser.isEmptyValue(Object)})
will be omitted from json output.Copyright © 2020. All rights reserved.