takeMessages

open override fun takeMessages(loggerClass: KClass<*>?, minLevel: Level, pattern: Regex?): List<String>

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


open override fun takeMessages(loggerClass: KClass<*>?, minLevel: Level, pattern: Regex?, consumeUnmatchedLogs: Boolean): List<String>

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