Package org.wildfly.event.logger
Class JsonEventFormatter
- java.lang.Object
-
- org.wildfly.event.logger.JsonEventFormatter
-
- All Implemented Interfaces:
EventFormatter
public class JsonEventFormatter extends Object implements EventFormatter
A formatter which transforms the event into a JSON string.- Author:
- James R. Perkins
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classJsonEventFormatter.BuilderBuilder used to create theJsonEventFormatter.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static JsonEventFormatter.Builderbuilder()Creates a new builder to build aJsonEventFormatter.Stringformat(Event event)Formats the event into a string.
-
-
-
Method Detail
-
builder
public static JsonEventFormatter.Builder builder()
Creates a new builder to build aJsonEventFormatter.- Returns:
- a new builder
-
format
public String format(Event event)
Description copied from interface:EventFormatterFormats the event into a string.- Specified by:
formatin interfaceEventFormatter- Parameters:
event- the event to format- Returns:
- the formatted string
-
-