- All Superinterfaces:
ch.qos.logback.core.spi.DeferredProcessingAware
- All Known Implementing Classes:
AccessEvent
This class is the internal representation of events to be logged.
When the HTTP container wishes to log an HTTP access event, then an instance of this class is created. This instance is passed around to the different logback components.
Put differently, the logback-access project revolves around this interface.
- Author:
- Ceki Gülcü, Sébastien Pennec, Jörn Huxhorn
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetAttribute
(String key) long
default List
<jakarta.servlet.http.Cookie> Return a list of cookies in the httpRequest.long
The number of seconds elapsed between receiving the request and logging it.long
The time elapsed between receiving the request and logging it in milliseconds.int
jakarta.servlet.http.HttpServletRequest
Returns the underlying HttpServletRequest.getRequestHeader
(String key) String[]
The first line of the request.jakarta.servlet.http.HttpServletResponse
Returns the underlying HttpServletResponse.getResponseHeader
(String key) long
The sequence number associated with this event.int
long
The number of milliseconds elapsed from 1/1/1970 until logging event was created.void
setThreadName
(String threadName) Methods inherited from interface ch.qos.logback.core.spi.DeferredProcessingAware
prepareForDeferredProcessing
-
Field Details
-
NA
-
SENTINEL
- See Also:
-
-
Method Details
-
getRequest
jakarta.servlet.http.HttpServletRequest getRequest()Returns the underlying HttpServletRequest. After serialization the returned value will be null.- Returns:
-
getResponse
jakarta.servlet.http.HttpServletResponse getResponse()Returns the underlying HttpServletResponse. After serialization the returned value will be null.- Returns:
-
getTimeStamp
long getTimeStamp()The number of milliseconds elapsed from 1/1/1970 until logging event was created. -
getSequenceNumber
long getSequenceNumber()The sequence number associated with this event.Sequence numbers, if present, should be increasing monotonically.
- Since:
- 1.3.0
-
getElapsedTime
long getElapsedTime()The time elapsed between receiving the request and logging it in milliseconds. -
getElapsedSeconds
long getElapsedSeconds()The number of seconds elapsed between receiving the request and logging it. -
getRequestURI
-
getRequestURL
The first line of the request. -
getRemoteHost
-
getRemoteUser
-
getProtocol
-
getMethod
-
getServerName
-
getSessionID
-
setThreadName
-
getThreadName
-
getQueryString
-
getRemoteAddr
-
getRequestHeader
-
getRequestHeaderNames
-
getRequestHeaderMap
-
getRequestParameterMap
-
getAttribute
-
getRequestParameter
-
getCookies
Return a list of cookies in the httpRequest. The list is immutable and is created if it did not exist previously.
The default implementation returns an immutable empty list.
- Returns:
- an immutable list of cookies in the httpRequest, the returned list can be empty but not null
- Since:
- version 2.0.2
-
getCookie
-
getContentLength
long getContentLength() -
getStatusCode
int getStatusCode() -
getRequestContent
-
getResponseContent
-
getLocalPort
int getLocalPort() -
getServerAdapter
-
getResponseHeader
-
getResponseHeaderMap
-
getResponseHeaderNameList
-