Class AsyncRFAAppender

java.lang.Object
org.apache.log4j.AppenderSkeleton
org.apache.log4j.AsyncAppender
org.apache.hadoop.hdfs.util.AsyncRFAAppender
All Implemented Interfaces:
org.apache.log4j.Appender, org.apache.log4j.spi.AppenderAttachable, org.apache.log4j.spi.OptionHandler

public class AsyncRFAAppender extends org.apache.log4j.AsyncAppender
Until we migrate to log4j2, use this appender for namenode audit logger as well as datanode and namenode metric loggers with log4j properties, if async logging is required with RFA. This appender will take parameters necessary to supply RollingFileAppender to AsyncAppender. While migrating to log4j2, we can directly wrap RFA appender to Async appender as part of log4j2 properties. However, same is not possible with log4j1 properties.
  • Field Summary

    Fields inherited from class org.apache.log4j.AsyncAppender

    DEFAULT_BUFFER_SIZE

    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
    void
    append(org.apache.log4j.spi.LoggingEvent event)
     
    int
     
     
     
    int
     
     
    boolean
     
    void
    setBlocking(boolean blocking)
     
    void
    setBufferSize(int bufferSize)
     
    void
    setConversionPattern(String conversionPattern)
     
    void
    setFileName(String fileName)
     
    void
    setMaxBackupIndex(int maxBackupIndex)
     
    void
    setMaxFileSize(String maxFileSize)
     

    Methods inherited from class org.apache.log4j.AsyncAppender

    addAppender, close, getAllAppenders, getAppender, getBlocking, getLocationInfo, isAttached, removeAllAppenders, removeAppender, removeAppender, requiresLayout, setLocationInfo

    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

    • AsyncRFAAppender

      public AsyncRFAAppender()
  • Method Details

    • append

      public void append(org.apache.log4j.spi.LoggingEvent event)
      Overrides:
      append in class org.apache.log4j.AsyncAppender
    • getMaxFileSize

      public String getMaxFileSize()
    • setMaxFileSize

      public void setMaxFileSize(String maxFileSize)
    • getMaxBackupIndex

      public int getMaxBackupIndex()
    • setMaxBackupIndex

      public void setMaxBackupIndex(int maxBackupIndex)
    • getFileName

      public String getFileName()
    • setFileName

      public void setFileName(String fileName)
    • getConversionPattern

      public String getConversionPattern()
    • setConversionPattern

      public void setConversionPattern(String conversionPattern)
    • isBlocking

      public boolean isBlocking()
    • setBlocking

      public void setBlocking(boolean blocking)
      Overrides:
      setBlocking in class org.apache.log4j.AsyncAppender
    • getBufferSize

      public int getBufferSize()
      Overrides:
      getBufferSize in class org.apache.log4j.AsyncAppender
    • setBufferSize

      public void setBufferSize(int bufferSize)
      Overrides:
      setBufferSize in class org.apache.log4j.AsyncAppender