Package org.zalando.logbook.json
Class FastJsonHttpLogFormatter
- java.lang.Object
-
- org.zalando.logbook.json.FastJsonHttpLogFormatter
-
- All Implemented Interfaces:
HttpLogFormatter
@API(status=STABLE) public final class FastJsonHttpLogFormatter extends Object implements HttpLogFormatter
A customHttpLogFormatterthat produces JSON objects.
-
-
Constructor Summary
Constructors Constructor Description FastJsonHttpLogFormatter()FastJsonHttpLogFormatter(com.fasterxml.jackson.databind.ObjectMapper mapper)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringformat(Correlation correlation, HttpResponse response)Stringformat(Precorrelation precorrelation, HttpRequest request)voidprepare(Correlation correlation, HttpResponse response, com.fasterxml.jackson.core.JsonGenerator generator)voidprepare(Precorrelation precorrelation, HttpRequest request, com.fasterxml.jackson.core.JsonGenerator generator)
-
-
-
Method Detail
-
format
public String format(Precorrelation precorrelation, HttpRequest request) throws IOException
- Specified by:
formatin interfaceHttpLogFormatter- Throws:
IOException
-
prepare
@API(status=EXPERIMENTAL) public void prepare(Precorrelation precorrelation, HttpRequest request, com.fasterxml.jackson.core.JsonGenerator generator) throws IOException
- Throws:
IOException
-
format
public String format(Correlation correlation, HttpResponse response) throws IOException
- Specified by:
formatin interfaceHttpLogFormatter- Throws:
IOException
-
prepare
@API(status=EXPERIMENTAL) public void prepare(Correlation correlation, HttpResponse response, com.fasterxml.jackson.core.JsonGenerator generator) throws IOException
- Throws:
IOException
-
-