Logger

class Logger(val pipes: MutableList<LoggerPipe> = mutableListOf(), val bufferSize: Int = 8192)(source)

A Logger is used to log messages

Since

0.1.0

Parameters

pipes

The LoggerPipes of the logger

bufferSize

The size of the buffer

Constructors

Link copied to clipboard
constructor(pipes: MutableList<LoggerPipe> = mutableListOf(), bufferSize: Int = 8192)

Creates a new Logger

Types

Link copied to clipboard
inner class TransformedOutput(val transformers: List<LogTransformer>)

Utility for generating a TransformedPipe to transform the logs before piping them to the given pipe

Properties

Link copied to clipboard
val bufferSize: Int = 8192

The size of the buffer

Link copied to clipboard

The logs of the logger

Link copied to clipboard

The LoggerPipes of the logger

Functions

Link copied to clipboard
fun debug(creator: LogMessageCreator)
fun debug(creator: LogMessageLambda)

Logs a debug message with the given creator

fun debug(message: String)

Logs a debug message with the given message

Link copied to clipboard
fun error(creator: LogMessageCreator)
fun error(creator: LogMessageLambda)

Logs an error message with the given creator

fun error(message: String)

Logs an error message with the given message

Link copied to clipboard
fun fatal(creator: LogMessageCreator)
fun fatal(creator: LogMessageLambda)

Logs a fatal message with the given creator

fun fatal(message: String)

Logs a fatal message with the given message

Link copied to clipboard

Pushes a LogEntry to the buffer

Link copied to clipboard
fun info(creator: LogMessageCreator)
fun info(creator: LogMessageLambda)

Logs an info message with the given creator

fun info(message: String)

Logs an info message with the given message

Link copied to clipboard
fun log(level: LogLevel, creator: LogMessageCreator)
fun log(level: LogLevel, creator: LogMessageLambda)

Logs a message with the given level and creator

fun log(level: LogLevel, message: String)

Logs a message with the given level and message

Link copied to clipboard
fun pipe(pipe: LoggerPipe)

Pipes the logs to the given pipe

Link copied to clipboard
fun pushBuffer(entry: LogEntry)
fun pushBuffer(level: LogLevel, message: String)

Pushes a LogEntry to the buffer

Link copied to clipboard

Logs a success message with the given creator

fun success(message: String)

Logs a success message with the given message

Link copied to clipboard

Transforms the logs with the given transformer before piping them to the given pipe

Transforms the logs with the given transformers before piping them to the given pipe

Link copied to clipboard
fun warn(creator: LogMessageCreator)
fun warn(creator: LogMessageLambda)

Logs a warning message with the given creator

fun warn(message: String)

Logs a warning message with the given message