FormatterBuilder

A builder class for constructing custom formatted log messages using a simple chain DSL.

The FormatterBuilder lets you compose the final log output by chaining steps in the desired order: e.g. pointer, spaces, line reference, the actual message, and any custom text. Important: the original message is not added automatically. You must call message somewhere in the chain, otherwise the resulting formatted text will not contain your message.

Available steps:

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard

Builds an IFormatter that applies all configured formatting operations to each message.

Link copied to clipboard

Adds custom text to the output sequence.

Link copied to clipboard

Adds the original log message to the output sequence.

Link copied to clipboard

Adds a single space character to the output sequence.

Link copied to clipboard

Adds a platform-specific caller reference to the output sequence.

Link copied to clipboard
fun withPointer(pointer: String = "--->"): FormatterBuilder

Adds a pointer marker to the output sequence.