Class MdcThresholdConditionalObserver

  • All Implemented Interfaces:
    LogEventObserver

    public class MdcThresholdConditionalObserver
    extends Object
    implements LogEventObserver
    A LogEventObserver that forwards all log events to a delegate observer if they have a log level equal to or more severe than the minimumThreshold or if there is a MDC variable on the thread which fulfills a configured logging rule

    Example configuration

         logger.org.example.app=INFO,DEBUG@mdc:user=superuser,admin,tester fileObserver
         logger.org.example.app.database=INFO,DEBUG@mdc:user=tester fileObserver
     
    Author:
    Johannes Brodwall