public class LoggerNameJsonProvider extends AbstractFieldJsonProvider<ILoggingEvent> implements FieldNamesAware<LogstashFieldNames>
| Modifier and Type | Field and Description |
|---|---|
static String |
FIELD_LOGGER_NAME |
context| Constructor and Description |
|---|
LoggerNameJsonProvider() |
| Modifier and Type | Method and Description |
|---|---|
int |
getShortenedLoggerNameLength() |
void |
setFieldNames(LogstashFieldNames fieldNames) |
void |
setShortenedLoggerNameLength(int length) |
void |
writeTo(JsonGenerator generator,
ILoggingEvent event)
Writes information about the event, to the given generator.
|
getFieldName, setFieldNameisStarted, 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, setContextpublic static final String FIELD_LOGGER_NAME
public void writeTo(JsonGenerator generator, ILoggingEvent event) throws IOException
JsonProviderWhen 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 int getShortenedLoggerNameLength()
public void setShortenedLoggerNameLength(int length)
Copyright © 2013–2021. All rights reserved.