Package wt.log4j.jmx

Class JMXAppender

java.lang.Object
org.apache.logging.log4j.core.AbstractLifeCycle
org.apache.logging.log4j.core.filter.AbstractFilterable
org.apache.logging.log4j.core.appender.AbstractAppender
wt.log4j.jmx.JMXAppender
All Implemented Interfaces:
NotificationBroadcaster, NotificationEmitter, 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="JMXAppenderPlugin", category="Core", elementType="appender", printObject=true) public final class JMXAppender extends org.apache.logging.log4j.core.appender.AbstractAppender implements NotificationEmitter
Log4j Appender which sends JMX notifications for log events. If a layout is specified, it will be used to construct the notification message.

This class essentially assumes an MBean will listen to its notifications and forward them to its listeners.

Supported API: true

Extendable: false

  • Nested Class Summary

    Nested classes/interfaces inherited from class org.apache.logging.log4j.core.appender.AbstractAppender

    org.apache.logging.log4j.core.appender.AbstractAppender.Builder<B extends org.apache.logging.log4j.core.appender.AbstractAppender.Builder<B>>

    Nested classes/interfaces inherited from interface org.apache.logging.log4j.core.LifeCycle

    org.apache.logging.log4j.core.LifeCycle.State
  • 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
    boolean
    Return whether detailed data beyond the logger message, as generated by the layout if specified, will be included in the notification as user data.
    Get accessor for log4j MDC (mapped diagnostic context) items to include in output; see Log4jConstants.
    void
    setIncludeDetailedData(boolean includeDetailedData)
    Set whether detailed data beyond the logger message, as generated by the layout if specified, will be included in the notification as user data.
    void
    setMDCItemsToInclude(String mdcItemsToInclude)
    Set accessor for log4j MDC (mapped diagnostic context) items to include in output; see Log4jConstants.

    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, 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, stop
  • Method Details

    • getIncludeDetailedData

      public boolean getIncludeDetailedData()
      Return whether detailed data beyond the logger message, as generated by the layout if specified, will be included in the notification as user data.

      Supported API: true
    • setIncludeDetailedData

      public void setIncludeDetailedData(boolean includeDetailedData)
      Set whether detailed data beyond the logger message, as generated by the layout if specified, will be included in the notification as user data.

      Supported API: true
    • getMDCItemsToInclude

      public String getMDCItemsToInclude()
      Get accessor for log4j MDC (mapped diagnostic context) items to include in output; see Log4jConstants. Ignored when not including detailed data. If null, all MDC data is included.

      Supported API: true
    • setMDCItemsToInclude

      public void setMDCItemsToInclude(String mdcItemsToInclude)
      Set accessor for log4j MDC (mapped diagnostic context) items to include in output; see Log4jConstants. Ignored when not including detailed data. If null, all MDC data is included.

      Supported API: true