Class 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
      JulAppender()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      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 close()  
      boolean requiresLayout()  
      • Methods inherited from class org.apache.log4j.AppenderSkeleton

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

      • JulAppender

        public JulAppender()
    • Method Detail

      • 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()