public class NewRelicAsyncAppender
extends ch.qos.logback.classic.AsyncAppender
AsyncAppender implementation that synchronously captures New Relic trace data.
This appender will wrap the existing AsyncAppender logic in order to capture New Relic data
on the same thread as the log message was created. To use, wrap your existing appender in your
config xml, and use the async appender in the appropriate logger.
<appender name="ASYNC" class="com.newrelic.logging.logback.NewRelicAsyncAppender">
<appender-ref ref="LOG_FILE" />
</appender>
<root level="INFO">
<appender-ref ref="ASYNC" />
<root>
| Modifier and Type | Field and Description |
|---|---|
static java.util.function.Supplier<com.newrelic.api.agent.Agent> |
agentSupplier |
static java.lang.String |
NEW_RELIC_PREFIX |
| Constructor and Description |
|---|
NewRelicAsyncAppender() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
preprocess(ch.qos.logback.classic.spi.ILoggingEvent eventObject) |
isDiscardable, isIncludeCallerData, setIncludeCallerDataaddAppender, append, detachAndStopAllAppenders, detachAppender, detachAppender, getAppender, getDiscardingThreshold, getMaxFlushTime, getNumberOfElementsInQueue, getQueueSize, getRemainingCapacity, isAttached, isNeverBlock, iteratorForAppenders, setDiscardingThreshold, setMaxFlushTime, setNeverBlock, setQueueSize, start, stopaddFilter, clearAllFilters, doAppend, getCopyOfAttachedFiltersList, getFilterChainDecision, getName, isStarted, setName, toStringaddError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContextpublic static final java.lang.String NEW_RELIC_PREFIX
public static java.util.function.Supplier<com.newrelic.api.agent.Agent> agentSupplier