Class LoggingTestKit$


  • public class LoggingTestKit$
    extends java.lang.Object
    Facilities for selectively matching expected events from logging.

    Requires Logback.

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static LoggingTestKit$ MODULE$
      Static reference to the singleton instance of this Scala object.
    • Constructor Summary

      Constructors 
      Constructor Description
      LoggingTestKit$()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      LoggingTestKit custom​(scala.Function1<LoggingEvent,​java.lang.Object> test)
      Create a custom event filter.
      LoggingTestKit deadLetters()
      Filter for the logging of dead letters.
      LoggingTestKit debug​(java.lang.String messageIncludes)
      Create a filter for DEBUG level events with a log message that contains the given messageIncludes.
      LoggingTestKit empty()
      An empty filter that doesn't match any events.
      LoggingTestKit error​(java.lang.String messageIncludes)
      Create a filter for ERROR level events with a log message that contains the given messageIncludes.
      <A extends java.lang.Throwable>
      LoggingTestKit
      error​(scala.reflect.ClassTag<A> evidence$3)
      Create a filter for WARN level events with a an included throwable that is a class or subclass of the given Throwable ClassTag.
      LoggingTestKit info​(java.lang.String messageIncludes)
      Create a filter for INFO level events with a log message that contains the given messageIncludes.
      LoggingTestKit messageContains​(java.lang.String str)
      Create a filter for events with a log message that contains the given messageIncludes.
      LoggingTestKit trace​(java.lang.String messageIncludes)
      Create a filter for TRACE level events with a log message that contains the given messageIncludes.
      LoggingTestKit warn​(java.lang.String messageIncludes)
      Create a filter for WARN level events with a log message that contains the given messageIncludes.
      <A extends java.lang.Throwable>
      LoggingTestKit
      warn​(scala.reflect.ClassTag<A> evidence$2)
      Create a filter for WARN level events with a an included throwable that is a class or subclass of the given Throwable ClassTag.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • MODULE$

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

      • LoggingTestKit$

        public LoggingTestKit$()
    • Method Detail

      • 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​(java.lang.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​(java.lang.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​(java.lang.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​(java.lang.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​(java.lang.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 <A extends java.lang.Throwable> LoggingTestKit warn​(scala.reflect.ClassTag<A> evidence$2)
        Create a filter for WARN level events with a an included throwable that is a class or subclass of the given Throwable ClassTag.

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

      • error

        public LoggingTestKit error​(java.lang.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 <A extends java.lang.Throwable> LoggingTestKit error​(scala.reflect.ClassTag<A> evidence$3)
        Create a filter for WARN level events with a an included throwable that is a class or subclass of the given Throwable ClassTag.

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

      • custom

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

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