Package com.atlassian.jira.logging
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 ClassesModifier and TypeClassDescriptionstatic classJiraHomeAppender.Builder<B extends JiraHomeAppender.Builder<B>> -
Field Summary
Fields inherited from class org.apache.logging.log4j.core.AbstractLifeCycle
DEFAULT_STOP_TIMEOUT, DEFAULT_STOP_TIMEUNIT, LOGGERFields inherited from interface org.apache.logging.log4j.core.Appender
ELEMENT_TYPE, EMPTY_ARRAY -
Method Summary
Modifier and TypeMethodDescriptionvoidappend(org.apache.logging.log4j.core.LogEvent event) getFile()static <B extends JiraHomeAppender.Builder<B>>
BvoidrollOver()Cause a log rollover to happenvoidstop()Methods inherited from class org.apache.logging.log4j.core.appender.AbstractAppender
error, error, error, getHandler, getLayout, getName, ignoreExceptions, parseInt, requiresLocation, setHandler, toSerializable, toStringMethods inherited from class org.apache.logging.log4j.core.filter.AbstractFilterable
addFilter, getFilter, getPropertyArray, hasFilter, isFiltered, removeFilter, start, stop, stopMethods inherited from class org.apache.logging.log4j.core.AbstractLifeCycle
equalsImpl, getState, getStatusLogger, hashCodeImpl, initialize, isInitialized, isStarted, isStarting, isStopped, isStopping, setStarted, setStarting, setState, setStopped, setStopping, stopMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.logging.log4j.core.LifeCycle
getState, initialize, isStarted, isStopped, start
-
Method Details
-
stop
public void stop()- Specified by:
stopin interfaceorg.apache.logging.log4j.core.LifeCycle- Overrides:
stopin classorg.apache.logging.log4j.core.AbstractLifeCycle
-
append
public void append(org.apache.logging.log4j.core.LogEvent event) - Specified by:
appendin interfaceorg.apache.logging.log4j.core.Appender
-
getFile
- Specified by:
getFilein interfaceRollOverLogAppender- Returns:
- the name of the current log file that can be rolled over
-
rollOver
public void rollOver()Description copied from interface:RollOverLogAppenderCause a log rollover to happen- Specified by:
rollOverin interfaceRollOverLogAppender
-
newBuilder
-