Package ch.qos.logback.core
Class AppenderBase<E>
- java.lang.Object
-
- ch.qos.logback.core.spi.ContextAwareBase
-
- ch.qos.logback.core.AppenderBase<E>
-
- All Implemented Interfaces:
Appender<E>,ContextAware,FilterAttachable<E>,LifeCycle
- Direct Known Subclasses:
AbstractServerSocketAppender,AbstractSocketAppender,CyclicBufferAppender,ListAppender,NOPAppender,SiftingAppenderBase,SMTPAppenderBase,SyslogAppenderBase
public abstract class AppenderBase<E> extends ContextAwareBase implements Appender<E>
Sets a skeleton implementation for appenders.For more information about this appender, please refer to the online manual at http://logback.qos.ch/manual/appenders.html#AppenderBase
-
-
Constructor Summary
Constructors Constructor Description AppenderBase()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddFilter(Filter<E> newFilter)Add a filter.voidclearAllFilters()voiddoAppend(E eventObject)This is where an appender accomplishes its work.java.util.List<Filter<E>>getCopyOfAttachedFiltersList()Get a copy of all the filters contained within this FilterAttachable object.FilterReplygetFilterChainDecision(E event)Loop through the filters in the chain.java.lang.StringgetName()Get the name of this appender.booleanisStarted()voidsetName(java.lang.String name)Set the name of this appender.voidstart()voidstop()java.lang.StringtoString()-
Methods inherited from class ch.qos.logback.core.spi.ContextAwareBase
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getStatusManager, setContext
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface ch.qos.logback.core.spi.ContextAware
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, setContext
-
-
-
-
Method Detail
-
getName
public java.lang.String getName()
Description copied from interface:AppenderGet the name of this appender. The name uniquely identifies the appender.
-
doAppend
public void doAppend(E eventObject)
Description copied from interface:AppenderThis is where an appender accomplishes its work. Note that the argument is of type Object.
-
setName
public void setName(java.lang.String name)
Set the name of this appender.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
addFilter
public void addFilter(Filter<E> newFilter)
Description copied from interface:FilterAttachableAdd a filter.- Specified by:
addFilterin interfaceFilterAttachable<E>
-
clearAllFilters
public void clearAllFilters()
- Specified by:
clearAllFiltersin interfaceFilterAttachable<E>
-
getCopyOfAttachedFiltersList
public java.util.List<Filter<E>> getCopyOfAttachedFiltersList()
Description copied from interface:FilterAttachableGet a copy of all the filters contained within this FilterAttachable object.- Specified by:
getCopyOfAttachedFiltersListin interfaceFilterAttachable<E>- Returns:
- all attached filters as a list
-
getFilterChainDecision
public FilterReply getFilterChainDecision(E event)
Description copied from interface:FilterAttachableLoop through the filters in the chain. As soon as a filter decides on ACCEPT or DENY, then that value is returned. If all of the filters return NEUTRAL, then NEUTRAL is returned.- Specified by:
getFilterChainDecisionin interfaceFilterAttachable<E>
-
-