Package org.apache.catalina.core
Class AccessLogAdapter
- java.lang.Object
-
- org.apache.catalina.core.AccessLogAdapter
-
-
Field Summary
-
Fields inherited from interface org.apache.catalina.AccessLog
PROTOCOL_ATTRIBUTE, REMOTE_ADDR_ATTRIBUTE, REMOTE_HOST_ATTRIBUTE, SERVER_NAME_ATTRIBUTE, SERVER_PORT_ATTRIBUTE
-
-
Constructor Summary
Constructors Constructor Description AccessLogAdapter(AccessLog log)Constructs a new adapter wrapping a single access log.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(AccessLog log)Adds an access log to this adapter.booleangetRequestAttributesEnabled()Checks if request attributes will be logged.voidlog(Request request, Response response, long time)Add the request/response to the access log using the specified processing time.voidsetRequestAttributesEnabled(boolean requestAttributesEnabled)This method is a NO-OP.
-
-
-
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:AccessLogAdd the request/response to the access log using the specified processing time.- Specified by:
login interfaceAccessLog- Parameters:
request- Request (associated with the response) to logresponse- Response (associated with the request) to logtime- 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 ownrequestAttributesEnabledsetting, so a single value cannot be applied to all of the wrapped instances.- Specified by:
setRequestAttributesEnabledin interfaceAccessLog- Parameters:
requestAttributesEnabled- Ignored
-
getRequestAttributesEnabled
public boolean getRequestAttributesEnabled()
Description copied from interface:AccessLogChecks if request attributes will be logged.- Specified by:
getRequestAttributesEnabledin interfaceAccessLog- Returns:
trueif the attributes will be logged, otherwisefalse- See Also:
AccessLog.setRequestAttributesEnabled(boolean)
-
-