Event
- type of event (ILoggingEvent
or IAccessEvent
).public abstract class CompositeJsonFormatter<Event extends ch.qos.logback.core.spi.DeferredProcessingAware>
extends ch.qos.logback.core.spi.ContextAwareBase
implements ch.qos.logback.core.spi.LifeCycle
JsonProvider
s.
The CompositeJsonFormatter
starts the JSON object ('{'),
then delegates writing the contents of the object to the JsonProvider
s,
and then ends the JSON object ('}').
Constructor and Description |
---|
CompositeJsonFormatter(ch.qos.logback.core.spi.ContextAware declaredOrigin) |
Modifier and Type | Method and Description |
---|---|
String |
getEncoding() |
com.fasterxml.jackson.core.JsonFactory |
getJsonFactory() |
JsonFactoryDecorator |
getJsonFactoryDecorator() |
JsonGeneratorDecorator |
getJsonGeneratorDecorator() |
JsonProviders<Event> |
getProviders() |
boolean |
isStarted() |
protected void |
prepareForDeferredProcessing(Event event) |
void |
setEncoding(String encodingName) |
void |
setJsonFactoryDecorator(JsonFactoryDecorator jsonFactoryDecorator) |
void |
setJsonGeneratorDecorator(JsonGeneratorDecorator jsonGeneratorDecorator) |
void |
setProviders(JsonProviders<Event> jsonProviders) |
void |
start() |
void |
stop() |
byte[] |
writeEventAsBytes(Event event) |
String |
writeEventAsString(Event event) |
protected void |
writeEventToGenerator(com.fasterxml.jackson.core.JsonGenerator generator,
Event event) |
void |
writeEventToOutputStream(Event event,
OutputStream outputStream) |
public CompositeJsonFormatter(ch.qos.logback.core.spi.ContextAware declaredOrigin)
public void start()
start
in interface ch.qos.logback.core.spi.LifeCycle
public void stop()
stop
in interface ch.qos.logback.core.spi.LifeCycle
public boolean isStarted()
isStarted
in interface ch.qos.logback.core.spi.LifeCycle
public byte[] writeEventAsBytes(Event event) throws IOException
IOException
public void writeEventToOutputStream(Event event, OutputStream outputStream) throws IOException
IOException
public String writeEventAsString(Event event) throws IOException
IOException
protected void writeEventToGenerator(com.fasterxml.jackson.core.JsonGenerator generator, Event event) throws IOException
IOException
protected void prepareForDeferredProcessing(Event event)
public com.fasterxml.jackson.core.JsonFactory getJsonFactory()
public JsonFactoryDecorator getJsonFactoryDecorator()
public void setJsonFactoryDecorator(JsonFactoryDecorator jsonFactoryDecorator)
public JsonGeneratorDecorator getJsonGeneratorDecorator()
public void setJsonGeneratorDecorator(JsonGeneratorDecorator jsonGeneratorDecorator)
public JsonProviders<Event> getProviders()
public String getEncoding()
public void setEncoding(String encodingName)
public void setProviders(JsonProviders<Event> jsonProviders)
Copyright © 2017. All Rights Reserved.