Class TurboFilter

    • Method Detail

      • decide

        public FilterReply decide​(Logger logger,
                                  org.slf4j.event.LoggingEvent slf4jEvent)

        This method is intended to be called via SLF4J's fluent API and more specifically by Logger.log(org.slf4j.event.LoggingEvent slf4jEvent). Derived classes are strongly encouraged to override this method with a better suited and more specialized implementation.

        The present default implementation translates the given SLF4J LoggingEvent into the set of parameters required by decide(Marker, Logger, Level, String, Object[], Throwable) and delegate the decision to that method.

        Concretely, this method:

        • extracts the first marker (if any) from the event's marker list,
        • maps the SLF4J level to Logback's Level,
        • and forwards the event message, arguments and throwable.

        Returns the FilterReply produced by decide(...), which should be one of DENY, NEUTRAL or ACCEPT.

        Derived classes are strongly encouraged to override this method with a better suited and more specialized implementation.

        Parameters:
        logger - the Logger that is logging the event; non-null
        slf4jEvent - the SLF4J logging event to translate and evaluate; may be non-null
        Returns:
        the filter decision (DENY, NEUTRAL or ACCEPT)
        Since:
        1.5.21