public class StackTraceJsonProvider extends AbstractFieldJsonProvider<ILoggingEvent> implements FieldNamesAware<LogstashFieldNames>
Modifier and Type | Field and Description |
---|---|
static String |
FIELD_STACK_TRACE |
context
Constructor and Description |
---|
StackTraceJsonProvider() |
Modifier and Type | Method and Description |
---|---|
ThrowableHandlingConverter |
getThrowableConverter() |
void |
setFieldNames(LogstashFieldNames fieldNames) |
void |
setThrowableConverter(ThrowableHandlingConverter throwableConverter) |
void |
start()
Start the provider after all configuration properties are set.
|
void |
stop()
Stop the provider
|
void |
writeTo(JsonGenerator generator,
ILoggingEvent event)
Writes information about the event, to the given generator.
|
getFieldName, setFieldName
isStarted, prepareForDeferredProcessing
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContext
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, setContext
public static final String FIELD_STACK_TRACE
public void start()
JsonProvider
start
in interface JsonProvider<ILoggingEvent>
start
in class AbstractJsonProvider<ILoggingEvent>
public void stop()
JsonProvider
stop
in interface JsonProvider<ILoggingEvent>
stop
in class AbstractJsonProvider<ILoggingEvent>
public void writeTo(JsonGenerator generator, ILoggingEvent event) throws IOException
JsonProvider
When called, the generator is assumed to be within a JSON object context (i.e. this provider should write fields and their values to the generator). Upon return, the generator should be within the same JSON object context.
writeTo
in interface JsonProvider<ILoggingEvent>
generator
- the JsonGenerator
to produce JSON contentevent
- the event to convert into JSONIOException
- if an I/O error occurspublic void setFieldNames(LogstashFieldNames fieldNames)
setFieldNames
in interface FieldNamesAware<LogstashFieldNames>
public ThrowableHandlingConverter getThrowableConverter()
public void setThrowableConverter(ThrowableHandlingConverter throwableConverter)
Copyright © 2013–2022. All rights reserved.