Top Description Fields Constructors Methods
org.apache.catalina.core

public Class AccessLogAdapter

extends Object
implements AccessLog
Class Inheritance
All Implemented Interfaces
org.apache.catalina.AccessLog
Imports
java.util.Arrays, .Objects, org.apache.catalina.AccessLog, org.apache.catalina.connector.Request, .Response

A helper class that wraps several AccessLog instances.

Field Summary

Modifier and TypeField and Description
private AccessLog[]

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
public boolean
public void
log(Request
Request (associated with the response) to log
request
,
Response
Response (associated with the request) to log
response
,
long
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
time
)

Implements org.apache.catalina.AccessLog.log.

Add the request/response to the access log using the specified processing time.

public void
setRequestAttributesEnabled(boolean
true causes the attributes to be used, false causes the original values to be used.
requestAttributesEnabled
)

Implements org.apache.catalina.AccessLog.setRequestAttributesEnabled.

Should this valve use request attributes for IP address, hostname, protocol and port used for the request?

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

logsback to summary
private AccessLog[] logs

Constructor Detail

AccessLogAdapterback to summary
public AccessLogAdapter(AccessLog log)

Method Detail

addback to summary
public void add(AccessLog log)
getRequestAttributesEnabledback to summary
public boolean getRequestAttributesEnabled()

Implements org.apache.catalina.AccessLog.getRequestAttributesEnabled.

Returns:boolean

Doc from org.apache.catalina.AccessLog.getRequestAttributesEnabled.

true if the attributes will be logged, otherwise false

Annotations
@Override
logback to summary
public void log(Request request, Response response, long time)

Implements org.apache.catalina.AccessLog.log.

Doc from org.apache.catalina.AccessLog.log.

Add the request/response to the access log using the specified processing time.

Parameters
request:Request

Request (associated with the response) to log

response:Response

Response (associated with the request) to log

time:long

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

Annotations
@Override
setRequestAttributesEnabledback to summary
public void setRequestAttributesEnabled(boolean requestAttributesEnabled)

Implements org.apache.catalina.AccessLog.setRequestAttributesEnabled.

Doc from org.apache.catalina.AccessLog.setRequestAttributesEnabled.

Should this valve use request attributes for IP address, hostname, protocol and port used for the request? The attributes used are:

  • org.apache.catalina.RemoteAddr
  • org.apache.catalina.RemoteHost
  • org.apache.catalina.Protocol
  • org.apache.catalina.ServerName
  • org.apache.catalina.ServerPost
Parameters
requestAttributesEnabled:boolean

true causes the attributes to be used, false causes the original values to be used.

Annotations
@Override