takeEvent

abstract fun takeEvent(loggerClass: KClass<*>? = null, minLevel: Level = Level.INFO, pattern: Regex? = null): ILoggingEvent

Waits until a matching event is logged, and returns it. The returned event and all preceding events are also removed.


abstract fun takeEvent(loggerClass: KClass<*>? = null, minLevel: Level = Level.INFO, pattern: Regex? = null, consumeUnmatchedLogs: Boolean = false): ILoggingEvent

Take the first matching event, optionally leaving unmatched logs in this collector.