Class InstrumentedAppender

  • All Implemented Interfaces:
    org.apache.log4j.Appender, org.apache.log4j.spi.OptionHandler

    public class InstrumentedAppender
    extends org.apache.log4j.AppenderSkeleton
    A Log4J Appender which has seven meters, one for each logging level and one for the total number of statements being logged. The meter names are the logging level names appended to the name of the appender.
    • Constructor Summary

      Constructors 
      Constructor Description
      InstrumentedAppender​(MetricRegistry registry)
      Create a new instrumented appender using the given registry.
      InstrumentedAppender​(java.lang.String registryName)
      Create a new instrumented appender using the given registry name.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void activateOptions()  
      protected void append​(org.apache.log4j.spi.LoggingEvent event)  
      void close()  
      boolean requiresLayout()  
      • Methods inherited from class org.apache.log4j.AppenderSkeleton

        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 Detail

      • InstrumentedAppender

        public InstrumentedAppender​(java.lang.String registryName)
        Create a new instrumented appender using the given registry name.
        Parameters:
        registryName - the name of the registry in SharedMetricRegistries
      • InstrumentedAppender

        public InstrumentedAppender​(MetricRegistry registry)
        Create a new instrumented appender using the given registry.
        Parameters:
        registry - the metric registry
    • Method Detail

      • activateOptions

        public void activateOptions()
        Specified by:
        activateOptions in interface org.apache.log4j.spi.OptionHandler
        Overrides:
        activateOptions in class org.apache.log4j.AppenderSkeleton
      • append

        protected void append​(org.apache.log4j.spi.LoggingEvent event)
        Specified by:
        append in class org.apache.log4j.AppenderSkeleton
      • close

        public void close()
      • requiresLayout

        public boolean requiresLayout()