Class BoskLogFilter

java.lang.Object
ch.qos.logback.core.spi.ContextAwareBase
ch.qos.logback.core.filter.Filter<ch.qos.logback.classic.spi.ILoggingEvent>
works.bosk.logback.BoskLogFilter
All Implemented Interfaces:
ch.qos.logback.core.spi.ContextAware, ch.qos.logback.core.spi.LifeCycle

public class BoskLogFilter extends ch.qos.logback.core.filter.Filter<ch.qos.logback.classic.spi.ILoggingEvent>
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
     
  • Field Summary

    Fields inherited from class ch.qos.logback.core.spi.ContextAwareBase

    context
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    ch.qos.logback.core.spi.FilterReply
    decide(ch.qos.logback.classic.spi.ILoggingEvent event)
     
    static <R extends works.bosk.StateTreeNode>
    works.bosk.DriverFactory<R>
    Causes the given controller to control logs emitted for any bosk configured to use the returned factory.
    static <R extends works.bosk.StateTreeNode>
    works.bosk.DriverFactory<R>
    withOverrides(ch.qos.logback.classic.Level level, Class<?>... loggers)
     

    Methods inherited from class ch.qos.logback.core.filter.Filter

    getName, isStarted, setName, start, stop

    Methods inherited from class ch.qos.logback.core.spi.ContextAwareBase

    addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContext

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • BoskLogFilter

      public BoskLogFilter()
  • Method Details

    • withOverrides

      public static <R extends works.bosk.StateTreeNode> works.bosk.DriverFactory<R> withOverrides(ch.qos.logback.classic.Level level, Class<?>... loggers)
    • withController

      public static <R extends works.bosk.StateTreeNode> works.bosk.DriverFactory<R> withController(BoskLogFilter.LogController controller)
      Causes the given controller to control logs emitted for any bosk configured to use the returned factory.

      Technically, this returns a factory that, when built, registers the given controller for logs having the MDC key MdcKeys.BOSK_INSTANCE_ID equal to the corresponding bosk's Bosk.instanceID(). (Registration cannot happen earlier, because the bosk's instance ID is not yet determined).

    • decide

      public ch.qos.logback.core.spi.FilterReply decide(ch.qos.logback.classic.spi.ILoggingEvent event)
      Specified by:
      decide in class ch.qos.logback.core.filter.Filter<ch.qos.logback.classic.spi.ILoggingEvent>