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

PropertyReturnsDescription
contentTypeStringContent type of the response, as sent in the Content-Type header.
durationMslongTime taken to serve the request, in milliseconds.
edmIdLongId 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.
impersonatingUserIdLongId 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.
numBytesLongSize of the response body sent to the client, in bytes. May be null if the size was not recorded.
orgIdLongId 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.
productIdLongId 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.
referrerStringReferrer 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.
reqDateDateDate and time the request was made. Setting this value also recalculates the year, month, day and hour values returned by the related accessors.
reqDayintDay of the month the request was made on, derived from the request date. Zero if the request date has not been set.
reqFromStringIP address the request was made from.
reqHostStringHost header sent with the request, identifying which domain the request was made to.
reqHourintHour 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.
reqMethodStringHTTP method of the request, for example GET or POST.
reqMonthintCalendar 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.
requestRangeStringRange 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.
reqUserStringIdentifier of the authenticated user who made the request, or null if the request was anonymous.
reqYearintCalendar year the request was made in, derived from the request date. Zero if the request date has not been set.
responseRangeStringContent-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.
resultCodeintHTTP status code the server returned for this request, for example 200 or 404.
trackingIdStringTracking 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.
urlStringPath and query string of the requested resource.
userAgentStringUser-Agent header sent with the request, identifying the client browser or tool that made it.
uuidStringUnique 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.
websiteIdLongId 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.

ParameterDescription
writerthe CSV writer the row is appended to
fthe formatter used to clean and format each column's value
To get full access to the Kademi Hub existing customers can login here, or new customers can register here.