Class LoggingTestKit$

java.lang.Object
org.apache.pekko.actor.testkit.typed.javadsl.LoggingTestKit$

public class LoggingTestKit$ extends Object
Facilities for selectively matching log messages.

Requires Logback.

  • Field Details

    • MODULE$

      public static final LoggingTestKit$ MODULE$
      Static reference to the singleton instance of this Scala object.
  • Constructor Details

    • LoggingTestKit$

      public LoggingTestKit$()
  • Method Details

    • empty

      public LoggingTestKit empty()
      An empty filter that doesn't match any events.

      More conditions can be added to the returned [LoggingEventFilter].

    • messageContains

      public LoggingTestKit messageContains(String str)
      Create a filter for events with a log message that contains the given messageIncludes.

      More conditions can be added to the returned [LoggingEventFilter].

    • trace

      public LoggingTestKit trace(String messageIncludes)
      Create a filter for TRACE level events with a log message that contains the given messageIncludes.

      More conditions can be added to the returned [LoggingEventFilter].

    • debug

      public LoggingTestKit debug(String messageIncludes)
      Create a filter for DEBUG level events with a log message that contains the given messageIncludes.

      More conditions can be added to the returned [LoggingEventFilter].

    • info

      public LoggingTestKit info(String messageIncludes)
      Create a filter for INFO level events with a log message that contains the given messageIncludes.

      More conditions can be added to the returned [LoggingEventFilter].

    • warn

      public LoggingTestKit warn(String messageIncludes)
      Create a filter for WARN level events with a log message that contains the given messageIncludes.

      More conditions can be added to the returned [LoggingEventFilter].

    • warn

      public LoggingTestKit warn(Class<Throwable> causeClass)
      Create a filter for WARN level events with an included throwable that is a class or subclass of the given * Throwable class.

      More conditions can be added to the returned [LoggingEventFilter].

    • error

      public LoggingTestKit error(String messageIncludes)
      Create a filter for ERROR level events with a log message that contains the given messageIncludes.

      More conditions can be added to the returned [LoggingEventFilter].

    • error

      public LoggingTestKit error(Class<? extends Throwable> causeClass)
      Create a filter for ERROR level events with an included throwable that is a class or subclass of the given * Throwable class.

      More conditions can be added to the returned [LoggingEventFilter].

    • custom

      public LoggingTestKit custom(scala.Function1<LoggingEvent,Object> test)
      Create a custom event filter. The filter will match those events for which for which the supplied function returns true.
    • deadLetters

      public LoggingTestKit deadLetters()
      Filter for the logging of dead letters.