Class AccessLogAdapter

  • All Implemented Interfaces:
    AccessLog

    public class AccessLogAdapter
    extends java.lang.Object
    implements AccessLog
    A helper class that wraps several AccessLog instances.
    • Constructor Detail

      • AccessLogAdapter

        public AccessLogAdapter​(AccessLog log)
        Constructs a new adapter wrapping a single access log.
        Parameters:
        log - The access log to wrap
    • Method Detail

      • add

        public void add​(AccessLog log)
        Adds an access log to this adapter.
        Parameters:
        log - The access log to add
      • log

        public void log​(Request request,
                        Response response,
                        long time)
        Description copied from interface: AccessLog
        Add the request/response to the access log using the specified processing time.
        Specified by:
        log in interface AccessLog
        Parameters:
        request - Request (associated with the response) to log
        response - Response (associated with the request) to log
        time - Time taken to process the request/response in nanoseconds (use 0 if not known); in Tomcat versions prior to 10, the time unit was milliseconds
      • setRequestAttributesEnabled

        public void setRequestAttributesEnabled​(boolean requestAttributesEnabled)
        This method is a NO-OP. Each wrapped AccessLog instance maintains its own requestAttributesEnabled setting, so a single value cannot be applied to all of the wrapped instances.
        Specified by:
        setRequestAttributesEnabled in interface AccessLog
        Parameters:
        requestAttributesEnabled - Ignored