Class JulAppender

java.lang.Object
org.apache.log4j.AppenderSkeleton
org.apache.log4j.JulAppender
All Implemented Interfaces:
org.apache.log4j.Appender, org.apache.log4j.spi.OptionHandler

public class JulAppender extends org.apache.log4j.AppenderSkeleton
We are unable to completely remove the log4j dependency due to ZooKeeper, which explicitly requires an internal class of the log4j package and is unavailable in the slf4j-over-log4j artifact.

This JUL appender is a workaround for this issue, appending all log4j events to JUL.

  • Field Summary

    Fields inherited from class org.apache.log4j.AppenderSkeleton

    closed, errorHandler, headFilter, layout, name, tailFilter, threshold
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    append(org.apache.log4j.spi.LoggingEvent loggingEvent)
    Append a log event at the appropriate JUL level, depending on the log4j level.
    void
     
    boolean
     

    Methods inherited from class org.apache.log4j.AppenderSkeleton

    activateOptions, addFilter, clearFilters, doAppend, finalize, getErrorHandler, getFilter, getFirstFilter, getLayout, getName, getThreshold, isAsSevereAsThreshold, setErrorHandler, setLayout, setName, setThreshold

    Methods inherited from class java.lang.Object

    clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • JulAppender

      public JulAppender()
  • Method Details

    • append

      protected void append(org.apache.log4j.spi.LoggingEvent loggingEvent)
      Append a log event at the appropriate JUL level, depending on the log4j level.
      Specified by:
      append in class org.apache.log4j.AppenderSkeleton
    • requiresLayout

      public boolean requiresLayout()
    • close

      public void close()