LogEventFormatter

fun interface LogEventFormatter(source)

Interface for formatting a LogEvent into a String.

Implementations of this interface define how log events are represented in the output (e.g., as JSON, plain text, or pretty-printed text).

Example of a custom formatter:

val myFormatter = LogEventFormatter { event ->
"[\${event.level}] \${event.loggerName}: \${event.message}"
}

Functions

Link copied to clipboard
abstract fun format(event: LogEvent): String

Formats the given event into a string representation.