Package com.google.appengine.api.log
Class RequestLogs
java.lang.Object
com.google.appengine.api.log.RequestLogs
- All Implemented Interfaces:
Serializable
RequestLogs contain all the log information for a single request. This
includes the request log as well as any application logs (which may
correspond to logging statements in the user's code or messages we have
inserted to alert them to certain conditions we have noticed).
Additionally, we include information about this request outside of those
logs, such as how long the request took, the IP of the user performing the
request, and so on.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanlongDeprecated.This value is no longer meaningful.getAppId()doublegetCost()longgetHost()getIp()longlonglongintlonglongintinthashCode()booleanbooleanvoidsetApiMcycles(long apiMcycles) voidsetAppEngineRelease(String appEngineRelease) voidvoidsetAppLogLines(List<AppLogLine> appLogLines) voidsetCombined(String combined) voidsetCost(double cost) voidsetEndTimeUsec(long endTimeUsec) voidsetFinished(boolean finished) voidvoidsetHttpVersion(String httpVersion) voidsetInstanceKey(String instanceKey) voidvoidsetLatency(long latency) voidsetMcycles(long mcycles) voidvoidsetModuleId(String moduleId) voidsetNickname(String nickname) voidvoidsetPendingTime(long pendingTime) voidsetReferrer(String referrer) voidsetReplicaIndex(int replicaIndex) voidsetRequestId(String requestId) voidsetResource(String resource) voidsetResponseSize(long responseSize) voidsetStartTimeUsec(long startTimeUsec) voidsetStatus(int status) voidsetTaskName(String taskName) voidsetTaskQueueName(String taskQueueName) voidsetUrlMapEntry(String urlMapEntry) voidsetUserAgent(String userAgent) voidsetVersionId(String versionId) voidsetWasLoadingRequest(boolean wasLoadingRequest) toString()
-
Constructor Details
-
RequestLogs
public RequestLogs()Default, zero-argument constructor for RequestLogs.
-
-
Method Details
-
getApiMcycles
Deprecated.This value is no longer meaningful.- Returns:
- The number of machine cycles spent in API calls while processing this request.
-
getAppId
- Returns:
- The application ID that handled this request.
-
getAppLogLines
- Returns:
- A list of application logs associated with this request.
-
getCombined
- Returns:
- The Apache-format combined log entry for this request. While the information in this field can be constructed from the rest of this message, we include this method for convenience.
-
getCost
public double getCost()- Returns:
- The estimated cost of this request, in dollars.
-
getEndTimeUsec
public long getEndTimeUsec()- Returns:
- The time at which the request was known to end processing, in microseconds since the Unix epoch.
-
getHost
- Returns:
- The Internet host and port number of the resource being requested.
-
getHttpVersion
- Returns:
- The HTTP version of this request.
-
getInstanceKey
- Returns:
- Mostly-unique identifier for the instance that handled the request, or the empty string.
-
getIp
- Returns:
- The origin IP address of this request. App Engine uses an origin IP address from the 0.0.0.0/8 range when the request is to a web hook. Some examples of web hooks are task queues, cron jobs and warming requests.
-
getLatencyUsec
public long getLatencyUsec()- Returns:
- The time required to process this request in microseconds.
-
getMcycles
public long getMcycles()- Returns:
- The number of machine cycles used to process this request.
-
getMethod
- Returns:
- The request's method (e.g., GET, PUT, POST).
-
getNickname
- Returns:
- The nickname of the user that made the request. An empty string is returned if the user is not logged in.
-
getOffset
- Returns:
- A Base64-encoded offset that may be used with a subsequent LogQuery to continue reading logs at the point in time immediately following this request.
-
getPendingTimeUsec
public long getPendingTimeUsec()- Returns:
- The time, in microseconds, that this request spent in the pending request queue, if it was pending at all.
-
getReferrer
- Returns:
- The referrer URL of this request.
-
getReplicaIndex
public int getReplicaIndex()- Returns:
- The backend replica that handled the request, or -1 if not serviced by a backend.
-
getRequestId
- Returns:
- A globally unique identifier for a request, based on the request's starting time.
-
getResource
- Returns:
- The resource path on the server requested by the client. Contains only the path component of the request URL.
-
getResponseSize
public long getResponseSize()- Returns:
- The size (in bytes) sent back to the client by this request.
-
getStartTimeUsec
public long getStartTimeUsec()- Returns:
- The time at which this request was known to have begun processing, in microseconds since the Unix epoch.
-
getStatus
public int getStatus()- Returns:
- The HTTP response status of this request.
-
getTaskName
- Returns:
- The request's task name, if this request was generated via the Task Queue API.
-
getTaskQueueName
- Returns:
- The request's queue name, if this request was generated via the Task Queue API.
-
getUrlMapEntry
- Returns:
- The file or class within the URL mapping used for this request. Useful for tracking down the source code which was responsible for managing the request, especially for multiply mapped handlers.
-
getUserAgent
- Returns:
- The user agent used to make this request.
-
getModuleId
- Returns:
- The module of the application that handled this request.
-
getVersionId
- Returns:
- The version of the application that handled this request.
-
isFinished
public boolean isFinished()- Returns:
- Whether or not this request has been finished. If not, this request is still active.
-
isLoadingRequest
public boolean isLoadingRequest()- Returns:
- Whether or not this request was a loading request.
-
getAppEngineRelease
- Returns:
- App Engine Release, e.g. "1.7.5", or the empty string.
-
setApiMcycles
public void setApiMcycles(long apiMcycles) -
setAppId
-
setAppLogLines
-
setCombined
-
setCost
public void setCost(double cost) -
setEndTimeUsec
public void setEndTimeUsec(long endTimeUsec) -
setFinished
public void setFinished(boolean finished) -
setHost
-
setHttpVersion
-
setInstanceKey
-
setIp
-
setLatency
public void setLatency(long latency) -
setMcycles
public void setMcycles(long mcycles) -
setMethod
-
setNickname
-
setOffset
-
setPendingTime
public void setPendingTime(long pendingTime) -
setReferrer
-
setReplicaIndex
public void setReplicaIndex(int replicaIndex) -
setRequestId
-
setResource
-
setResponseSize
public void setResponseSize(long responseSize) -
setStartTimeUsec
public void setStartTimeUsec(long startTimeUsec) -
setStatus
public void setStatus(int status) -
setTaskName
-
setTaskQueueName
-
setUrlMapEntry
-
setUserAgent
-
setModuleId
-
setVersionId
-
setWasLoadingRequest
public void setWasLoadingRequest(boolean wasLoadingRequest) -
setAppEngineRelease
-
toString
-
hashCode
public int hashCode() -
equals
-