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 java.lang.Object implements HttpLogFormatter
A custom
HttpLogFormatter that produces JSON objects.-
Constructor Summary
Constructors Constructor Description FastJsonHttpLogFormatter()FastJsonHttpLogFormatter(com.fasterxml.jackson.databind.ObjectMapper mapper) -
Method Summary
Modifier and Type Method Description java.lang.Stringformat(Correlation correlation, HttpResponse response)java.lang.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)
-
Constructor Details
-
FastJsonHttpLogFormatter
public FastJsonHttpLogFormatter() -
FastJsonHttpLogFormatter
public FastJsonHttpLogFormatter(com.fasterxml.jackson.databind.ObjectMapper mapper)
-
-
Method Details
-
format
public java.lang.String format(Precorrelation precorrelation, HttpRequest request) throws java.io.IOException- Specified by:
formatin interfaceHttpLogFormatter- Throws:
java.io.IOException
-
prepare
@API(status=EXPERIMENTAL) public void prepare(Precorrelation precorrelation, HttpRequest request, com.fasterxml.jackson.core.JsonGenerator generator) throws java.io.IOException- Throws:
java.io.IOException
-
format
public java.lang.String format(Correlation correlation, HttpResponse response) throws java.io.IOException- Specified by:
formatin interfaceHttpLogFormatter- Throws:
java.io.IOException
-
prepare
@API(status=EXPERIMENTAL) public void prepare(Correlation correlation, HttpResponse response, com.fasterxml.jackson.core.JsonGenerator generator) throws java.io.IOException- Throws:
java.io.IOException
-