public class AsyncAppender
extends ch.qos.logback.core.spi.ContextAwareBase
implements ch.qos.logback.core.Appender<ch.qos.logback.classic.spi.ILoggingEvent>, ch.qos.logback.core.spi.AppenderAttachable<ch.qos.logback.classic.spi.ILoggingEvent>, org.reactivestreams.Subscriber<ch.qos.logback.classic.spi.ILoggingEvent>
RingBufferProcessor
internally
to queue events to a single-writer thread. This implementation doesn't do any actually appending itself, it just
delegates to a "real" appender but it uses the efficient queueing mechanism of the RingBuffer to do so.Constructor and Description |
---|
AsyncAppender() |
Modifier and Type | Method and Description |
---|---|
void |
addAppender(ch.qos.logback.core.Appender<ch.qos.logback.classic.spi.ILoggingEvent> newAppender) |
void |
addFilter(ch.qos.logback.core.filter.Filter<ch.qos.logback.classic.spi.ILoggingEvent> newFilter) |
void |
clearAllFilters() |
void |
detachAndStopAllAppenders() |
boolean |
detachAppender(ch.qos.logback.core.Appender<ch.qos.logback.classic.spi.ILoggingEvent> appender) |
boolean |
detachAppender(String name) |
void |
doAppend(ch.qos.logback.classic.spi.ILoggingEvent evt) |
protected void |
doStart() |
protected void |
doStop() |
ch.qos.logback.core.Appender<ch.qos.logback.classic.spi.ILoggingEvent> |
getAppender(String name) |
protected ch.qos.logback.core.spi.AppenderAttachableImpl<ch.qos.logback.classic.spi.ILoggingEvent> |
getAppenderImpl() |
long |
getBacklog() |
List<ch.qos.logback.core.filter.Filter<ch.qos.logback.classic.spi.ILoggingEvent>> |
getCopyOfAttachedFiltersList() |
ch.qos.logback.core.spi.FilterReply |
getFilterChainDecision(ch.qos.logback.classic.spi.ILoggingEvent event) |
String |
getName() |
boolean |
isAttached(ch.qos.logback.core.Appender<ch.qos.logback.classic.spi.ILoggingEvent> appender) |
boolean |
isIncludeCallerData() |
boolean |
isStarted() |
Iterator<ch.qos.logback.core.Appender<ch.qos.logback.classic.spi.ILoggingEvent>> |
iteratorForAppenders() |
void |
onComplete() |
void |
onError(Throwable t) |
void |
onNext(ch.qos.logback.classic.spi.ILoggingEvent iLoggingEvent) |
void |
onSubscribe(org.reactivestreams.Subscription s) |
protected void |
queueLoggingEvent(ch.qos.logback.classic.spi.ILoggingEvent evt) |
void |
setBacklog(int backlog) |
void |
setIncludeCallerData(boolean includeCallerData) |
void |
setName(String name) |
void |
start() |
void |
stop() |
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContext
public long getBacklog()
public void setBacklog(int backlog)
public boolean isIncludeCallerData()
public void setIncludeCallerData(boolean includeCallerData)
public String getName()
getName
in interface ch.qos.logback.core.Appender<ch.qos.logback.classic.spi.ILoggingEvent>
public void setName(String name)
setName
in interface ch.qos.logback.core.Appender<ch.qos.logback.classic.spi.ILoggingEvent>
public boolean isStarted()
isStarted
in interface ch.qos.logback.core.spi.LifeCycle
public void doAppend(ch.qos.logback.classic.spi.ILoggingEvent evt) throws ch.qos.logback.core.LogbackException
doAppend
in interface ch.qos.logback.core.Appender<ch.qos.logback.classic.spi.ILoggingEvent>
ch.qos.logback.core.LogbackException
public void start()
start
in interface ch.qos.logback.core.spi.LifeCycle
public void onSubscribe(org.reactivestreams.Subscription s)
onSubscribe
in interface org.reactivestreams.Subscriber<ch.qos.logback.classic.spi.ILoggingEvent>
public void onNext(ch.qos.logback.classic.spi.ILoggingEvent iLoggingEvent)
onNext
in interface org.reactivestreams.Subscriber<ch.qos.logback.classic.spi.ILoggingEvent>
public void onError(Throwable t)
onError
in interface org.reactivestreams.Subscriber<ch.qos.logback.classic.spi.ILoggingEvent>
public void onComplete()
onComplete
in interface org.reactivestreams.Subscriber<ch.qos.logback.classic.spi.ILoggingEvent>
public void stop()
stop
in interface ch.qos.logback.core.spi.LifeCycle
public void addFilter(ch.qos.logback.core.filter.Filter<ch.qos.logback.classic.spi.ILoggingEvent> newFilter)
addFilter
in interface ch.qos.logback.core.spi.FilterAttachable<ch.qos.logback.classic.spi.ILoggingEvent>
public void clearAllFilters()
clearAllFilters
in interface ch.qos.logback.core.spi.FilterAttachable<ch.qos.logback.classic.spi.ILoggingEvent>
public List<ch.qos.logback.core.filter.Filter<ch.qos.logback.classic.spi.ILoggingEvent>> getCopyOfAttachedFiltersList()
getCopyOfAttachedFiltersList
in interface ch.qos.logback.core.spi.FilterAttachable<ch.qos.logback.classic.spi.ILoggingEvent>
public ch.qos.logback.core.spi.FilterReply getFilterChainDecision(ch.qos.logback.classic.spi.ILoggingEvent event)
getFilterChainDecision
in interface ch.qos.logback.core.spi.FilterAttachable<ch.qos.logback.classic.spi.ILoggingEvent>
public void addAppender(ch.qos.logback.core.Appender<ch.qos.logback.classic.spi.ILoggingEvent> newAppender)
addAppender
in interface ch.qos.logback.core.spi.AppenderAttachable<ch.qos.logback.classic.spi.ILoggingEvent>
public Iterator<ch.qos.logback.core.Appender<ch.qos.logback.classic.spi.ILoggingEvent>> iteratorForAppenders()
iteratorForAppenders
in interface ch.qos.logback.core.spi.AppenderAttachable<ch.qos.logback.classic.spi.ILoggingEvent>
public ch.qos.logback.core.Appender<ch.qos.logback.classic.spi.ILoggingEvent> getAppender(String name)
getAppender
in interface ch.qos.logback.core.spi.AppenderAttachable<ch.qos.logback.classic.spi.ILoggingEvent>
public boolean isAttached(ch.qos.logback.core.Appender<ch.qos.logback.classic.spi.ILoggingEvent> appender)
isAttached
in interface ch.qos.logback.core.spi.AppenderAttachable<ch.qos.logback.classic.spi.ILoggingEvent>
public void detachAndStopAllAppenders()
detachAndStopAllAppenders
in interface ch.qos.logback.core.spi.AppenderAttachable<ch.qos.logback.classic.spi.ILoggingEvent>
public boolean detachAppender(ch.qos.logback.core.Appender<ch.qos.logback.classic.spi.ILoggingEvent> appender)
detachAppender
in interface ch.qos.logback.core.spi.AppenderAttachable<ch.qos.logback.classic.spi.ILoggingEvent>
public boolean detachAppender(String name)
detachAppender
in interface ch.qos.logback.core.spi.AppenderAttachable<ch.qos.logback.classic.spi.ILoggingEvent>
protected ch.qos.logback.core.spi.AppenderAttachableImpl<ch.qos.logback.classic.spi.ILoggingEvent> getAppenderImpl()
protected void doStart()
protected void doStop()
protected void queueLoggingEvent(ch.qos.logback.classic.spi.ILoggingEvent evt)
Copyright © 2017. All rights reserved.