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 Type
    Method
    Description
    createFilter(org.apache.logging.log4j.core.Filter.Result onMatch, org.apache.logging.log4j.core.Filter.Result onMismatch)
    Used to instantiate new HibernateLogSuppressingMdcFilter
    org.apache.logging.log4j.core.Filter.Result
    filter(org.apache.logging.log4j.core.LogEvent event)
     
     

    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 interface org.apache.logging.log4j.core.Filter
      Overrides:
      filter in class org.apache.logging.log4j.core.filter.AbstractFilter
    • toString

      public String toString()
      Overrides:
      toString in class org.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 new HibernateLogSuppressingMdcFilter