public class LogstashTcpEncoder extends LogstashEncoder
LogstashEncoder adding encoding support and the new line
termination.
<ENCODING/> Define the used encoding as defined in Charset. The default value is UTF-8
<NEWLINE/> Define the new line. Any defined character is used as new line terminator.
The set of pre-defined values are:
UNIX \n character (default).
NULL no new line.
SYSTEM operating system new line.
WINDOWS the \r\n combination
| Constructor and Description |
|---|
LogstashTcpEncoder() |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
doEncode(ch.qos.logback.classic.spi.ILoggingEvent event) |
String |
getEncoding() |
String |
getNewLine() |
void |
setEncoding(String encoding)
Define the encoding used for sending the logs
|
void |
setNewLine(String newLine)
Define the new line.
|
getCustomFields, getFieldNames, getFormatter, getJsonFactoryDecorator, getJsonGeneratorDecorator, getShortenedLoggerNameLength, isEnableContextMap, isImmediateFlush, isIncludeCallerInfo, isIncludeContext, isIncludeMdc, setCustomFields, setEnableContextMap, setFieldNames, setImmediateFlush, setIncludeCallerInfo, setIncludeContext, setIncludeMdc, setJsonFactoryDecorator, setJsonGeneratorDecorator, setShortenedLoggerNameLength, start, stopaddError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContextpublic void doEncode(ch.qos.logback.classic.spi.ILoggingEvent event)
throws IOException
doEncode in interface ch.qos.logback.core.encoder.Encoder<ch.qos.logback.classic.spi.ILoggingEvent>doEncode in class LogstashEncoderIOExceptionpublic void close()
throws IOException
close in interface ch.qos.logback.core.encoder.Encoder<ch.qos.logback.classic.spi.ILoggingEvent>close in class LogstashEncoderIOExceptionpublic void setEncoding(String encoding)
encoding - the encoding to setpublic String getEncoding()
public void setNewLine(String newLine)
newLine - the newLine to setpublic String getNewLine()
Copyright © 2014. All Rights Reserved.