Class HibernateLogSuppressingMdcFilter
java.lang.Object
org.apache.logging.log4j.core.AbstractLifeCycle
org.apache.logging.log4j.core.filter.AbstractFilter
com.atlassian.crowd.console.logging.HibernateLogSuppressingMdcFilter
- All Implemented Interfaces:
org.apache.logging.log4j.core.Filter
,org.apache.logging.log4j.core.LifeCycle
,org.apache.logging.log4j.core.LifeCycle2
@Plugin(name="HibernateLogSuppressingMdcFilter",
category="Core",
elementType="filter",
printObject=true)
public class HibernateLogSuppressingMdcFilter
extends org.apache.logging.log4j.core.filter.AbstractFilter
This context wide logging filter suppresses Hibernate loggers which would log errors which happened during an SQL insert operation.
The aim is not polluting the log with errors in cases where insertion errors are expected (such as empty cluster lock insertions).
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.logging.log4j.core.filter.AbstractFilter
org.apache.logging.log4j.core.filter.AbstractFilter.AbstractFilterBuilder<B extends org.apache.logging.log4j.core.filter.AbstractFilter.AbstractFilterBuilder<B>>
Nested classes/interfaces inherited from interface org.apache.logging.log4j.core.Filter
org.apache.logging.log4j.core.Filter.Result
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.filter.AbstractFilter
onMatch, onMismatch
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.Filter
ELEMENT_TYPE, EMPTY_ARRAY
-
Method Summary
Modifier and TypeMethodDescriptioncreateFilter
(org.apache.logging.log4j.core.Filter.Result onMatch, org.apache.logging.log4j.core.Filter.Result onMismatch) Used to instantiate newHibernateLogSuppressingMdcFilter
org.apache.logging.log4j.core.Filter.Result
filter
(org.apache.logging.log4j.core.LogEvent event) toString()
Methods inherited from class org.apache.logging.log4j.core.filter.AbstractFilter
equalsImpl, filter, filter, filter, filter, filter, filter, filter, filter, filter, filter, filter, filter, filter, getOnMatch, getOnMismatch, hashCodeImpl
Methods inherited from class org.apache.logging.log4j.core.AbstractLifeCycle
getState, getStatusLogger, initialize, isInitialized, isStarted, isStarting, isStopped, isStopping, setStarted, setStarting, setState, setStopped, setStopping, start, stop, 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.Filter
filter
Methods inherited from interface org.apache.logging.log4j.core.LifeCycle
getState, initialize, isStarted, isStopped, start, stop
-
Method Details
-
filter
public org.apache.logging.log4j.core.Filter.Result filter(org.apache.logging.log4j.core.LogEvent event) - Specified by:
filter
in interfaceorg.apache.logging.log4j.core.Filter
- Overrides:
filter
in classorg.apache.logging.log4j.core.filter.AbstractFilter
-
toString
- Overrides:
toString
in classorg.apache.logging.log4j.core.filter.AbstractFilter
-
createFilter
@PluginFactory public static HibernateLogSuppressingMdcFilter createFilter(@PluginAttribute("onMatch") org.apache.logging.log4j.core.Filter.Result onMatch, @PluginAttribute("onMismatch") org.apache.logging.log4j.core.Filter.Result onMismatch) Used to instantiate newHibernateLogSuppressingMdcFilter
-