public class NewRelicEncoder
extends ch.qos.logback.core.encoder.EncoderBase<ch.qos.logback.classic.spi.ILoggingEvent>
Encoder that will write New Relic's JSON format.
To use, set this as an encoder on an appender using OutputStreamAppender.setEncoder(Encoder).
(This is the base class for both RollingFileAppender and ConsoleAppender.)
<appender name="LOG_FILE" class="ch.qos.logback.core.FileAppender">
<file>logs/app-log-file.log</file>
<encoder class="com.newrelic.logging.logback.NewRelicEncoder"/>
</appender>
| Constructor and Description |
|---|
NewRelicEncoder() |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
encode(ch.qos.logback.classic.spi.ILoggingEvent event) |
byte[] |
footerBytes() |
byte[] |
headerBytes() |
void |
setMaxStackSize(java.lang.Integer maxStackSize) |
void |
start() |
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContextpublic byte[] encode(ch.qos.logback.classic.spi.ILoggingEvent event)
public void start()
start in interface ch.qos.logback.core.spi.LifeCyclestart in class ch.qos.logback.core.encoder.EncoderBase<ch.qos.logback.classic.spi.ILoggingEvent>public void setMaxStackSize(java.lang.Integer maxStackSize)
public byte[] headerBytes()
public byte[] footerBytes()