BaseConsole

open class BaseConsole : AnsiEscape

Inheritors

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
Link copied to clipboard
data class LogEntry(val kind: BaseConsole.Kind, val msg: List<Any?>)

Properties

Link copied to clipboard

Shortcut for this.bgColor(Color.BLACK)

Link copied to clipboard
open val String.bgBlue: String

Shortcut for this.bgColor(Color.BLUE)

Link copied to clipboard
open val String.bgCyan: String

Shortcut for this.bgColor(Color.CYAN)

Link copied to clipboard

Shortcut for this.bgColor(Color.GREEN)

Link copied to clipboard

Shortcut for this.bgColor(Color.PURPLE)

Link copied to clipboard
open val String.bgRed: String

Shortcut for this.bgColor(Color.RED)

Link copied to clipboard

Shortcut for this.bgColor(Color.WHITE)

Link copied to clipboard

Shortcut for this.bgColor(Color.YELLOW)

Link copied to clipboard
open val String.black: String

Shortcut for this.color(Color.BLACK)

Link copied to clipboard
open val String.blue: String

Shortcut for this.color(Color.BLUE)

Link copied to clipboard
open val String.bold: String

Makes this String to be bold

Link copied to clipboard

Makes this String to be reversed/highlighted (background/color swapped)

Link copied to clipboard
open val String.cyan: String

Shortcut for this.color(Color.CYAN)

Link copied to clipboard
open val String.green: String

Shortcut for this.color(Color.GREEN)

Link copied to clipboard
open val String.purple: String

Shortcut for this.color(Color.PURPLE)

Link copied to clipboard
open val String.red: String

Shortcut for this.color(Color.RED)

Link copied to clipboard

Makes this String to be underlined

Link copied to clipboard
open val String.white: String

Shortcut for this.color(Color.WHITE)

Link copied to clipboard
open val String.yellow: String

Shortcut for this.color(Color.YELLOW)

Functions

Link copied to clipboard
open fun String.ansiEscape(code: Int, extra: String? = null, char: Char = 'm'): String

Sets a raw ansi escape sequence for this String

Link copied to clipboard
open fun StringBuilder.appendAnsiScape(code: Int, extra: String? = null, char: Char = 'm'): StringBuilder
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun String.bgColor(color: AnsiEscape.Color, bright: Boolean = false): String

Makes this string to be in background color and bright

Link copied to clipboard
open fun String.bgColor256(index: Int): String

Makes this string to be in background color index

Link copied to clipboard
inline fun capture(block: () -> Unit): List<BaseConsole.LogEntry>
Link copied to clipboard
open fun String.color(color: AnsiEscape.Color, bright: Boolean = false): String

Makes this string to be in foreground color and bright

Link copied to clipboard
open fun String.color256(index: Int): String

Makes this string to be in foreground color index

Link copied to clipboard
fun debug(vararg msg: Any?)

Registers a debug in the console

Link copied to clipboard
fun error(vararg msg: Any?)

Registers an error in the console

Link copied to clipboard
inline fun <T> hook(noinline hook: (kind: BaseConsole.Kind, msg: Array<out Any?>, logInternal: (kind: BaseConsole.Kind, msg: Array<out Any?>) -> Unit) -> Unit, block: () -> T): T
Link copied to clipboard
fun info(vararg msg: Any?)

Registers a info in the console

Link copied to clipboard
fun log(vararg msg: Any?)

Registers a log in the console

fun log(kind: BaseConsole.Kind, vararg msg: Any?)
Link copied to clipboard
fun trace(vararg msg: Any?)

Registers a trace in the console

Link copied to clipboard
fun warn(vararg msg: Any?)

Registers a warn in the console