Package works.bosk.logback
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 -
Field Summary
Fields inherited from class ch.qos.logback.core.spi.ContextAwareBase
context -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionch.qos.logback.core.spi.FilterReplydecide(ch.qos.logback.classic.spi.ILoggingEvent event) static <R extends works.bosk.StateTreeNode>
works.bosk.DriverFactory<R>withController(BoskLogFilter.LogController controller) Causes the givencontrollerto 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, stopMethods inherited from class ch.qos.logback.core.spi.ContextAwareBase
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContext
-
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 givencontrollerto control logs emitted for any bosk configured to use the returned factory.Technically, this returns a factory that, when
built, registers the givencontrollerfor logs having the MDC keyMdcKeys.BOSK_INSTANCE_IDequal to the corresponding bosk'sBosk.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:
decidein classch.qos.logback.core.filter.Filter<ch.qos.logback.classic.spi.ILoggingEvent>
-