public class LogstashEncoder extends LoggingEventCompositeJsonEncoder
started
context
Constructor and Description |
---|
LogstashEncoder() |
setProviders
encode, encode, footerBytes, getEncoding, getJsonFactoryDecorator, getJsonGeneratorDecorator, getLineSeparator, getMinBufferSize, getPrefix, getProviders, getSuffix, headerBytes, setEncoding, setFindAndRegisterJacksonModules, setJsonFactoryDecorator, setJsonGeneratorDecorator, setLineSeparator, setMinBufferSize, setPrefix, setSuffix, start, stop
isStarted
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
protected AbstractCompositeJsonFormatter<ILoggingEvent> createFormatter()
createFormatter
in class LoggingEventCompositeJsonEncoder
protected LogstashFormatter getFormatter()
getFormatter
in class CompositeJsonEncoder<ILoggingEvent>
public void addProvider(JsonProvider<ILoggingEvent> provider)
public boolean isIncludeCallerData()
public void setIncludeCallerData(boolean includeCallerData)
public void setCustomFields(String customFields)
public String getCustomFields()
public LogstashFieldNames getFieldNames()
public void setFieldNames(LogstashFieldNames fieldNames)
public int getShortenedLoggerNameLength()
public void setShortenedLoggerNameLength(int length)
public boolean isIncludeMdc()
public void setIncludeMdc(boolean includeMdc)
public void addIncludeMdcKeyName(String includedMdcKeyName)
public void addExcludeMdcKeyName(String excludedMdcKeyName)
public void addMdcKeyFieldName(String mdcKeyFieldName)
public boolean isIncludeTags()
public void setIncludeTags(boolean includeTags)
public boolean isIncludeContext()
public void setIncludeContext(boolean includeContext)
public boolean isIncludeStructuredArguments()
public void setIncludeStructuredArguments(boolean includeStructuredArguments)
public boolean isIncludeNonStructuredArguments()
public void setIncludeNonStructuredArguments(boolean includeNonStructuredArguments)
public String getNonStructuredArgumentsFieldPrefix()
public void setNonStructuredArgumentsFieldPrefix(String nonStructuredArgumentsFieldPrefix)
public ThrowableHandlingConverter getThrowableConverter()
public void setThrowableConverter(ThrowableHandlingConverter throwableConverter)
public String getTimeZone()
public void setTimeZone(String timeZoneId)
public String getTimestampPattern()
public void setTimestampPattern(String pattern)
public String getVersion()
public void setVersion(String version)
public boolean isWriteVersionAsInteger()
public void setWriteVersionAsInteger(boolean writeVersionAsInteger)
public String getMessageSplitRegex()
public void setMessageSplitRegex(String messageSplitRegex)
The allowed values are:
SYSTEM
: Use the system-default line separator.UNIX
: Use \n
.WINDOWS
: Use \r\n
.For example, if this parameter is set to the regex #+
, then the logging statement:
log.info("First line##Second line###Third line")will produce:
{ ... "message": [ "First line", "Second line", "Third line" ], ... }
messageSplitRegex
- The regex used to split the message textCopyright © 2013–2022. All rights reserved.