Interface StructuredLogFormatter<E>
- Type Parameters:
E
- the log event type
- All Known Implementing Classes:
JsonWriterStructuredLogFormatter
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
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
- Since:
- 3.4.0
- Author:
- Moritz Halbritter
-
Method Summary
-
Method Details
-
format
Formats the given log event to a String.- Parameters:
event
- the log event to write- Returns:
- the formatted log event String
-
formatAsBytes
Formats the given log event to a byte array.- Parameters:
event
- the log event to writecharset
- the charset- Returns:
- the formatted log event bytes
-