Class StackTraceJsonProvider
java.lang.Object
ch.qos.logback.core.spi.ContextAwareBase
net.logstash.logback.composite.AbstractJsonProvider<ILoggingEvent>
net.logstash.logback.composite.AbstractFieldJsonProvider<ILoggingEvent>
net.logstash.logback.composite.loggingevent.StackTraceJsonProvider
- All Implemented Interfaces:
ContextAware, FieldNamesAware<LogstashFieldNames>, JsonProvider<ILoggingEvent>
public class StackTraceJsonProvider
extends AbstractFieldJsonProvider<ILoggingEvent>
implements FieldNamesAware<LogstashFieldNames>
-
Field Summary
FieldsFields inherited from class ContextAwareBase
context -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanvoidsetFieldNames(LogstashFieldNames fieldNames) voidsetThrowableConverter(ThrowableHandlingConverter throwableConverter) voidsetWriteAsArray(boolean writeAsArray) voidstart()Start the provider after all configuration properties are set.voidstop()Stop the providervoidwriteTo(JsonGenerator generator, ILoggingEvent event) Writes information about the event, to the given generator.Methods inherited from class AbstractFieldJsonProvider
getFieldName, setFieldNameMethods inherited from class AbstractJsonProvider
assertIsStarted, isStarted, prepareForDeferredProcessingMethods inherited from class ContextAwareBase
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContextMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ContextAware
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, setContext
-
Field Details
-
FIELD_STACK_TRACE
- See Also:
-
-
Constructor Details
-
StackTraceJsonProvider
public StackTraceJsonProvider()
-
-
Method Details
-
start
public void start()Description copied from interface:JsonProviderStart the provider after all configuration properties are set.- Specified by:
startin interfaceJsonProvider<ILoggingEvent>- Overrides:
startin classAbstractJsonProvider<ILoggingEvent>
-
stop
public void stop()Description copied from interface:JsonProviderStop the provider- Specified by:
stopin interfaceJsonProvider<ILoggingEvent>- Overrides:
stopin classAbstractJsonProvider<ILoggingEvent>
-
writeTo
Description copied from interface:JsonProviderWrites information about the event, to the given generator.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.
- Specified by:
writeToin interfaceJsonProvider<ILoggingEvent>- Parameters:
generator- theJsonGeneratorto produce JSON contentevent- the event to convert into JSON
-
setFieldNames
- Specified by:
setFieldNamesin interfaceFieldNamesAware<LogstashFieldNames>
-
getThrowableConverter
-
setThrowableConverter
-
isWriteAsArray
public boolean isWriteAsArray() -
setWriteAsArray
public void setWriteAsArray(boolean writeAsArray)
-