Class JiraHomeAppender

java.lang.Object
org.apache.logging.log4j.core.AbstractLifeCycle
org.apache.logging.log4j.core.filter.AbstractFilterable
org.apache.logging.log4j.core.appender.AbstractAppender
com.atlassian.jira.logging.JiraHomeAppender
All Implemented Interfaces:
RollOverLogAppender, org.apache.logging.log4j.core.Appender, org.apache.logging.log4j.core.filter.Filterable, org.apache.logging.log4j.core.impl.LocationAware, org.apache.logging.log4j.core.LifeCycle, org.apache.logging.log4j.core.LifeCycle2

@Plugin(name="JiraHomeAppender", category="Core", elementType="appender", printObject=true) public class JiraHomeAppender extends org.apache.logging.log4j.core.appender.AbstractAppender implements RollOverLogAppender
A log4j appender that will log output data to the JIRA.HOME/log directory. It accepts the same options as the RollingFileAppender.

The appender may be called before JIRA.HOME is ready to be used. In this situation the appender will buffer the log events until the JIRA.HOME is ready. Once ready, all the events will be flushed in order.

The appender will revert to its old behaviour (creating a file in the working directory) if JIRA.HOME is not configured correctly.

Since:
v4.1
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
     
  • Field Summary

    Fields inherited from class org.apache.logging.log4j.core.AbstractLifeCycle

    DEFAULT_STOP_TIMEOUT, DEFAULT_STOP_TIMEUNIT, LOGGER

    Fields inherited from interface org.apache.logging.log4j.core.Appender

    ELEMENT_TYPE, EMPTY_ARRAY
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    append(org.apache.logging.log4j.core.LogEvent event)
     
     
    static <B extends JiraHomeAppender.Builder<B>>
    B
     
    void
    Cause a log rollover to happen
    void
     

    Methods inherited from class org.apache.logging.log4j.core.appender.AbstractAppender

    error, error, error, getHandler, getLayout, getName, ignoreExceptions, parseInt, requiresLocation, setHandler, toSerializable, toString

    Methods inherited from class org.apache.logging.log4j.core.filter.AbstractFilterable

    addFilter, getFilter, getPropertyArray, hasFilter, isFiltered, removeFilter, start, stop, stop

    Methods inherited from class org.apache.logging.log4j.core.AbstractLifeCycle

    equalsImpl, getState, getStatusLogger, hashCodeImpl, initialize, isInitialized, isStarted, isStarting, isStopped, isStopping, setStarted, setStarting, setState, setStopped, setStopping, stop

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.apache.logging.log4j.core.LifeCycle

    getState, initialize, isStarted, isStopped, start
  • Method Details

    • stop

      public void stop()
      Specified by:
      stop in interface org.apache.logging.log4j.core.LifeCycle
      Overrides:
      stop in class org.apache.logging.log4j.core.AbstractLifeCycle
    • append

      public void append(org.apache.logging.log4j.core.LogEvent event)
      Specified by:
      append in interface org.apache.logging.log4j.core.Appender
    • getFile

      public String getFile()
      Specified by:
      getFile in interface RollOverLogAppender
      Returns:
      the name of the current log file that can be rolled over
    • rollOver

      public void rollOver()
      Description copied from interface: RollOverLogAppender
      Cause a log rollover to happen
      Specified by:
      rollOver in interface RollOverLogAppender
    • newBuilder

      @PluginBuilderFactory public static <B extends JiraHomeAppender.Builder<B>> B newBuilder()