ColoredUnitTestTrainer

open class ColoredUnitTestTrainer(minLevel: Level = Level.VERBOSE, showTimestamp: Boolean = true) : UnitTestTrainer(source)

ColoredTestTrainer extends UnitTestTrainer with ANSI color support.

This trainer inherits all the functionality of UnitTestTrainer but adds beautiful color coding for different log levels and exceptions.

Features over base UnitTestTrainer:

  • ANSI color coding by log level

  • Colored exception highlighting

  • All the same smart features (test detection, timestamps, etc.)

Since

0.0.1

Parameters

minLevel

Minimum log level to output (defaults to Level.VERBOSE - shows all)

showTimestamp

Whether to include timestamps in output (defaults to true)

Constructors

Link copied to clipboard
constructor(minLevel: Level = Level.VERBOSE, showTimestamp: Boolean = true)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open override val minLevel: Level
Link copied to clipboard
override val pack: Pack

The Pack that this Trainer belongs to, which will be used to find duplicative trainers and avoid duplicative log messages.

Functions

Link copied to clipboard
open override fun handle(level: Level, tag: String, message: String, throwable: Throwable?)

Handle a log message by outputting it to plain console during tests.