Package org.apache.logging.log4j.core.filter
@Export
@Version("2.21.1")
package org.apache.logging.log4j.core.filter
Log4j 2 Filter support.
Filter
plugins should use the
plugin category
Core
and the
element type
filter
.-
ClassDescriptionUsers should extend this class to implement filters.Enhances a Class by allowing it to contain Filters.AbstractFilterable.Builder<B extends AbstractFilterable.Builder<B>>Subclasses can extend this abstract Builder.The
BurstFilter
is a logging filter that regulates logging traffic.Composes and invokes one or more filters.This filter causes all logging events to be dropped.Compares against a log level that is associated with a context value.Interface implemented by Classes that allow filtering to occur.This filter returns the onMatch result if the logging level in the event matches the specified logging level exactly.This filter returns theAbstractFilter.onMatch
result if the level of theLogEvent
is in the range of the configuredLevelRangeFilter.minLevel
andLevelRangeFilter.maxLevel
values, otherwise it returns theAbstractFilter.onMismatch
result.A Filter that operates on a Map.This filter returns the onMatch result if the marker in the LogEvent is the same as or has the configured marker as a parent.Filter based on a value in the Thread Context Map (MDC).This filter returns the onMatch result if there is no marker in the LogEvent.A filter that matches the given regular expression pattern against messages.Returns the onMatch result if the script returns True and returns the onMismatch value otherwise.This filter returns the onMatch result if the logging level in the event matches the specified logging level exactly.Filter based on data in a StructuredDataMessage.Filter based on a value in the Thread Context Map (MDC).This filter returns the onMatch result if the level in the LogEvent is the same or more specific than the configured level and the onMismatch value otherwise.Filters events that fall within a specified time period in each day.