Class Slf4jAppender<E>

java.lang.Object
ch.qos.logback.core.spi.ContextAwareBase
ch.qos.logback.core.UnsynchronizedAppenderBase<E>
csw.logging.client.compat.Slf4jAppender<E>
All Implemented Interfaces:
ch.qos.logback.core.Appender<E>, ch.qos.logback.core.spi.AppenderAttachable<E>, ch.qos.logback.core.spi.ContextAware, ch.qos.logback.core.spi.FilterAttachable<E>, ch.qos.logback.core.spi.LifeCycle

public class Slf4jAppender<E> extends ch.qos.logback.core.UnsynchronizedAppenderBase<E> implements ch.qos.logback.core.spi.AppenderAttachable<E>
This class is wired up as appender in logback.xml. The instance of this class is created via reflection. When log statement from SLF4J code is executed, a message is sent to this class. Then this class will simply process the received message and forward it to underlying logging code.
  • Field Summary

    Fields inherited from class ch.qos.logback.core.UnsynchronizedAppenderBase

    name, started

    Fields inherited from class ch.qos.logback.core.spi.ContextAwareBase

    context
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addAppender(ch.qos.logback.core.Appender<E> a)
     
    void
    append(E event)
     
    void
     
    boolean
    detachAppender(ch.qos.logback.core.Appender<E> x$1)
     
    boolean
     
    ch.qos.logback.core.Appender<E>
     
    boolean
    isAttached(ch.qos.logback.core.Appender<E> x$1)
     
    Iterator<ch.qos.logback.core.Appender<E>>
     

    Methods inherited from class ch.qos.logback.core.UnsynchronizedAppenderBase

    addFilter, clearAllFilters, doAppend, getCopyOfAttachedFiltersList, getFilterChainDecision, getName, isStarted, setName, start, stop, toString

    Methods inherited from class ch.qos.logback.core.spi.ContextAwareBase

    addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContext

    Methods inherited from class java.lang.Object

    clone, equals, finalize, 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
  • Constructor Details

    • Slf4jAppender

      public Slf4jAppender()
  • Method Details

    • addAppender

      public void addAppender(ch.qos.logback.core.Appender<E> a)
      Specified by:
      addAppender in interface ch.qos.logback.core.spi.AppenderAttachable<E>
    • append

      public void append(E event)
      Specified by:
      append in class ch.qos.logback.core.UnsynchronizedAppenderBase<E>
    • detachAndStopAllAppenders

      public void detachAndStopAllAppenders()
      Specified by:
      detachAndStopAllAppenders in interface ch.qos.logback.core.spi.AppenderAttachable<E>
    • detachAppender

      public boolean detachAppender(String x$1)
      Specified by:
      detachAppender in interface ch.qos.logback.core.spi.AppenderAttachable<E>
    • detachAppender

      public boolean detachAppender(ch.qos.logback.core.Appender<E> x$1)
      Specified by:
      detachAppender in interface ch.qos.logback.core.spi.AppenderAttachable<E>
    • getAppender

      public ch.qos.logback.core.Appender<E> getAppender(String x$1)
      Specified by:
      getAppender in interface ch.qos.logback.core.spi.AppenderAttachable<E>
    • isAttached

      public boolean isAttached(ch.qos.logback.core.Appender<E> x$1)
      Specified by:
      isAttached in interface ch.qos.logback.core.spi.AppenderAttachable<E>
    • iteratorForAppenders

      public Iterator<ch.qos.logback.core.Appender<E>> iteratorForAppenders()
      Specified by:
      iteratorForAppenders in interface ch.qos.logback.core.spi.AppenderAttachable<E>