StructuredLogFormatter

Formats a log event to a structured log message.

Implementing classes can declare the following parameter types in the constructor:

When using Logback, implementing classes can also use the following parameter types in the constructor:
  • ThrowableProxyConverter

Author

Moritz Halbritter

Since

3.4.0

Parameters

<E>

the log event type

Inheritors

Functions

Link copied to clipboard
abstract fun format(event: E): String
Formats the given log event to a String.
Link copied to clipboard
open fun formatAsBytes(event: E, charset: Charset): Array<Byte>
Formats the given log event to a byte array.