Represents a single logged HTTP request against a Kademi website - one row of the access log. An instance is produced either by AccessLogService when a request is served (via insertLog), or by parsing a persisted CSV log line back into a bean for reporting and searching. Instances are also serialised back to CSV for storage, and indexed into the search engine so requests can be queried by website, IP, content type, user or tracking id.
Properties
| Property | Returns | Description |
|---|---|---|
| contentType | String | Content type of the response, as sent in the Content-Type header. |
| durationMs | long | Time taken to serve the request, in milliseconds. |
| edmId | Long | Id of the email (EDM) item whose link the visitor followed to reach this request, if the visit originated from a tracked email. Null if the request was not attributed to an email. |
| impersonatingUserId | Long | Id of the administrator impersonating the requesting user at the time of the request, if the request was made during an impersonation session. Null if the request was not made under impersonation. |
| numBytes | Long | Size of the response body sent to the client, in bytes. May be null if the size was not recorded. |
| orgId | Long | Id of the organisation the request was served for. Never null for a valid entry - parsing a CSV row with no organisation id returns null rather than producing a bean without one. |
| productId | Long | Id of the product the request relates to, if the request was for a product page or resource. Null if the request is not associated with a product. |
| referrer | String | Referrer header sent with the request, identifying the page that linked to this URL. May be null or blank if the client did not send one. |
| reqDate | Date | Date and time the request was made. Setting this value also recalculates the year, month, day and hour values returned by the related accessors. |
| reqDay | int | Day of the month the request was made on, derived from the request date. Zero if the request date has not been set. |
| reqFrom | String | IP address the request was made from. |
| reqHost | String | Host header sent with the request, identifying which domain the request was made to. |
| reqHour | int | Hour of the day the request was made in, in 24 hour format, derived from the request date. Zero if the request date has not been set. |
| reqMethod | String | HTTP method of the request, for example GET or POST. |
| reqMonth | int | Calendar month the request was made in, derived from the request date using zero-based numbering (January is 0). Zero if the request date has not been set. |
| requestRange | String | Range header sent with the request, present when the client asked for a partial download of the resource. May be null if no range was requested. |
| reqUser | String | Identifier of the authenticated user who made the request, or null if the request was anonymous. |
| reqYear | int | Calendar year the request was made in, derived from the request date. Zero if the request date has not been set. |
| responseRange | String | Content-Range header sent with the response, present when the server returned a partial response. May be null if the response was not a partial range. |
| resultCode | int | HTTP status code the server returned for this request, for example 200 or 404. |
| trackingId | String | Tracking id associated with the request, used to correlate this hit with a visitor's session or with a site visitor record across multiple requests. May be null if no tracking id was supplied. |
| url | String | Path and query string of the requested resource. |
| userAgent | String | User-Agent header sent with the request, identifying the client browser or tool that made it. |
| uuid | String | Unique identifier for this request, used as the primary key when the entry is indexed for search and when correlating a request with related records. Either supplied by the caller or generated as a random UUID when the entry is created. |
| websiteId | Long | Id of the website the request was made against, or null if the request was not attributed to a specific website. |
Methods
getUuid() · getOrgId() · getWebsiteId() · getReqHost() · getUrl() · getReferrer() · getReqDate() · getReqYear() · getReqMonth() · getReqDay() · getReqHour() · getResultCode() · getDurationMs() · getNumBytes() · getReqMethod() · getContentType() · getReqFrom() · getReqUser() · getUserAgent() · getTrackingId() · getRequestRange() · getResponseRange() · getProductId() · getEdmId() · getImpersonatingUserId() · toCsv(CSVWriter writer, Formatter f)
getUuid()
Returns: String
Unique identifier for this request, used as the primary key when the entry is indexed for search and when correlating a request with related records. Either supplied by the caller or generated as a random UUID when the entry is created.
getOrgId()
Returns: Long
Id of the organisation the request was served for. Never null for a valid entry - parsing a CSV row with no organisation id returns null rather than producing a bean without one.
getWebsiteId()
Returns: Long
Id of the website the request was made against, or null if the request was not attributed to a specific website.
getReqHost()
Returns: String
Host header sent with the request, identifying which domain the request was made to.
getUrl()
Returns: String
Path and query string of the requested resource.
getReferrer()
Returns: String
Referrer header sent with the request, identifying the page that linked to this URL. May be null or blank if the client did not send one.
getReqDate()
Returns: Date
Date and time the request was made. Setting this value also recalculates the year, month, day and hour values returned by the related accessors.
getReqYear()
Returns: int
Calendar year the request was made in, derived from the request date. Zero if the request date has not been set.
getReqMonth()
Returns: int
Calendar month the request was made in, derived from the request date using zero-based numbering (January is 0). Zero if the request date has not been set.
getReqDay()
Returns: int
Day of the month the request was made on, derived from the request date. Zero if the request date has not been set.
getReqHour()
Returns: int
Hour of the day the request was made in, in 24 hour format, derived from the request date. Zero if the request date has not been set.
getResultCode()
Returns: int
HTTP status code the server returned for this request, for example 200 or 404.
getDurationMs()
Returns: long
Time taken to serve the request, in milliseconds.
getNumBytes()
Returns: Long
Size of the response body sent to the client, in bytes. May be null if the size was not recorded.
getReqMethod()
Returns: String
HTTP method of the request, for example GET or POST.
getContentType()
Returns: String
Content type of the response, as sent in the Content-Type header.
getReqFrom()
Returns: String
IP address the request was made from.
getReqUser()
Returns: String
Identifier of the authenticated user who made the request, or null if the request was anonymous.
getUserAgent()
Returns: String
User-Agent header sent with the request, identifying the client browser or tool that made it.
getTrackingId()
Returns: String
Tracking id associated with the request, used to correlate this hit with a visitor's session or with a site visitor record across multiple requests. May be null if no tracking id was supplied.
getRequestRange()
Returns: String
Range header sent with the request, present when the client asked for a partial download of the resource. May be null if no range was requested.
getResponseRange()
Returns: String
Content-Range header sent with the response, present when the server returned a partial response. May be null if the response was not a partial range.
getProductId()
Returns: Long
Id of the product the request relates to, if the request was for a product page or resource. Null if the request is not associated with a product.
getEdmId()
Returns: Long
Id of the email (EDM) item whose link the visitor followed to reach this request, if the visit originated from a tracked email. Null if the request was not attributed to an email.
getImpersonatingUserId()
Returns: Long
Id of the administrator impersonating the requesting user at the time of the request, if the request was made during an impersonation session. Null if the request was not made under impersonation.
toCsv(CSVWriter writer, Formatter f)
Returns: void
Writes this entry as a single CSV row, in the fixed column order that parse expects when reading a row back. Used to persist access log entries to disk for later reindexing or export.
| Parameter | Description |
|---|---|
writer | the CSV writer the row is appended to |
f | the formatter used to clean and format each column's value |