Class EventPublishingAppender

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

    public class EventPublishingAppender
    extends org.apache.log4j.AppenderSkeleton
    Publishes an ErrorLoggedEvent via Atlassian-Events whenever a log message exceeds the configured threshold.

    To configure, add the following lines to log4j.properties and add 'events' to your rootLogger list:

     log4j.appender.events=com.atlassian.confluence.logging.EventPublishingAppender
     log4j.appender.events.Threshold=ERROR
     
    See Also:
    ErrorLoggedEvent
    • Field Summary

      • Fields inherited from class org.apache.log4j.AppenderSkeleton

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

      • EventPublishingAppender

        public EventPublishingAppender()
    • Method Detail

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