takeMessages

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

Removes all currently-collected log messages and returns those that match the requested criteria.


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

Takes all matching messages, optionally leaving unmatched logs in this collector.