Class DefaultHttpLogFormatter

java.lang.Object
org.zalando.logbook.core.DefaultHttpLogFormatter
All Implemented Interfaces:
org.zalando.logbook.HttpLogFormatter

@API(status=STABLE) public final class DefaultHttpLogFormatter extends Object implements org.zalando.logbook.HttpLogFormatter
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    format(org.zalando.logbook.Correlation correlation, org.zalando.logbook.HttpResponse response)
    Produces an HTTP-like request in individual lines.
    format(org.zalando.logbook.Precorrelation precorrelation, org.zalando.logbook.HttpRequest request)
    Produces an HTTP-like request in individual lines.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • DefaultHttpLogFormatter

      public DefaultHttpLogFormatter()
  • Method Details

    • format

      public String format(org.zalando.logbook.Precorrelation precorrelation, org.zalando.logbook.HttpRequest request) throws IOException
      Produces an HTTP-like request in individual lines.
      Specified by:
      format in interface org.zalando.logbook.HttpLogFormatter
      Parameters:
      precorrelation - the request correlation
      request - the HTTP request
      Returns:
      a line-separated HTTP request
      Throws:
      IOException - if reading body fails
    • format

      public String format(org.zalando.logbook.Correlation correlation, org.zalando.logbook.HttpResponse response) throws IOException
      Produces an HTTP-like request in individual lines.
      Specified by:
      format in interface org.zalando.logbook.HttpLogFormatter
      Parameters:
      correlation - the request correlation
      Returns:
      a line-separated HTTP request
      Throws:
      IOException - if reading body fails
      See Also:
      • StructuredHttpLogFormatter.prepare(Precorrelation, HttpRequest)