LogFormatters
Factory object for obtaining standard LogEventFormatter implementations.
Each factory method returns a pre-configured formatter suitable for common output scenarios. Custom formatters can be created by implementing LogEventFormatter directly or using its fun interface syntax:
val myFormatter = LogEventFormatter { event ->
"[${event.level}] ${event.loggerName}: ${event.message}"
}Functions
Returns a formatter that produces a compact single-line output including the log level, logger name, message, and inline attributes.
Returns a formatter that produces a concise, human-readable single-line output containing the log level, logger name, message, and stack trace (if a throwable is present).
Returns a formatter that serializes each log event as a single-line JSON object, suitable for ingestion by log aggregation platforms such as Elasticsearch, Datadog, Splunk, and Loki.