Class JdkLoggingFilter

java.lang.Object
java.util.logging.Formatter
ee.jakarta.tck.ws.rs.common.client.JdkLoggingFilter
All Implemented Interfaces:
jakarta.ws.rs.client.ClientRequestFilter, jakarta.ws.rs.client.ClientResponseFilter

@Provider @Priority(2147483647) public class JdkLoggingFilter extends Formatter implements jakarta.ws.rs.client.ClientRequestFilter, jakarta.ws.rs.client.ClientResponseFilter
  • Constructor Summary

    Constructors
    Constructor
    Description
    JdkLoggingFilter(boolean printEntity)
    Create a logging filter logging the request and response to a default JDK logger, named as the fully qualified class name of this class.
    JdkLoggingFilter(Logger logger, boolean printEntity)
    Create a logging filter with custom logger and custom settings of entity logging.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    filter(jakarta.ws.rs.client.ClientRequestContext requestContext)
     
    void
    filter(jakarta.ws.rs.client.ClientRequestContext arg0, jakarta.ws.rs.client.ClientResponseContext responseContext)
     
    format(LogRecord record)
     

    Methods inherited from class java.util.logging.Formatter

    formatMessage, getHead, getTail

    Methods inherited from class java.lang.Object

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

    • JdkLoggingFilter

      public JdkLoggingFilter(boolean printEntity)
      Create a logging filter logging the request and response to a default JDK logger, named as the fully qualified class name of this class.
    • JdkLoggingFilter

      public JdkLoggingFilter(Logger logger, boolean printEntity)
      Create a logging filter with custom logger and custom settings of entity logging.
      Parameters:
      logger - the logger to log requests and responses.
      printEntity - if true, entity will be logged as well.
  • Method Details

    • filter

      public void filter(jakarta.ws.rs.client.ClientRequestContext arg0, jakarta.ws.rs.client.ClientResponseContext responseContext) throws IOException
      Specified by:
      filter in interface jakarta.ws.rs.client.ClientResponseFilter
      Throws:
      IOException
    • filter

      public void filter(jakarta.ws.rs.client.ClientRequestContext requestContext) throws IOException
      Specified by:
      filter in interface jakarta.ws.rs.client.ClientRequestFilter
      Throws:
      IOException
    • format

      public String format(LogRecord record)
      Specified by:
      format in class Formatter