Stay organized with collections
Save and categorize content based on your preferences.
publicfinalclassRequestLogsimplementsSerializable
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.
Constructs a new (external-facing) RequestLogs from an (internal-facing)
RequestLog. We scrub out any fields that the Protocol Buffer specification
for RequestLog names as Google-only fields.
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.
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.
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-03 UTC."],[[["\u003cp\u003e\u003ccode\u003eRequestLogs\u003c/code\u003e is a class that compiles all log information for a single request, including request logs, application logs, and additional request-related data.\u003c/p\u003e\n"],["\u003cp\u003eIt includes details like request duration, the user's IP address, and messages indicating specific conditions.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eRequestLogs\u003c/code\u003e implements the \u003ccode\u003eSerializable\u003c/code\u003e interface, allowing it to be converted into a byte stream, and inherits methods from the \u003ccode\u003eObject\u003c/code\u003e class.\u003c/p\u003e\n"],["\u003cp\u003eIt contains a constructor that can create a new \u003ccode\u003eRequestLogs\u003c/code\u003e object from a \u003ccode\u003eRequestLog\u003c/code\u003e and offset, and many methods to retrieve relevant information about the request such as \u003ccode\u003egetIp()\u003c/code\u003e, \u003ccode\u003egetAppLogLines()\u003c/code\u003e, \u003ccode\u003egetCost()\u003c/code\u003e, and many more.\u003c/p\u003e\n"]]],[],null,["# Class RequestLogs (2.0.0)\n\n public final class RequestLogs implements Serializable\n\nRequestLogs contain all the log information for a single request. This\nincludes the request log as well as any application logs (which may\ncorrespond to logging statements in the user's code or messages we have\ninserted to alert them to certain conditions we have noticed).\nAdditionally, we include information about this request outside of those\nlogs, such as how long the request took, the IP of the user performing the\nrequest, and so on. \n\nInheritance\n-----------\n\n[java.lang.Object](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html) \\\u003e RequestLogs \n\nImplements\n----------\n\n[Serializable](https://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html) \n\nInherited Members\n-----------------\n\n[Object.clone()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#clone--) \n[Object.equals(Object)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-) \n[Object.finalize()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--) \n[Object.getClass()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--) \n[Object.hashCode()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--) \n[Object.notify()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--) \n[Object.notifyAll()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--) \n[Object.toString()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#toString--) \n[Object.wait()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--) \n[Object.wait(long)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-) \n[Object.wait(long,int)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-)\n\nConstructors\n------------\n\n### RequestLogs()\n\n public RequestLogs()\n\nDefault, zero-argument constructor for RequestLogs.\n\n### RequestLogs(LogServicePb.RequestLog requestLog, String offset)\n\n protected RequestLogs(LogServicePb.RequestLog requestLog, String offset)\n\nConstructs a new (external-facing) RequestLogs from an (internal-facing)\nRequestLog. We scrub out any fields that the Protocol Buffer specification\nfor RequestLog names as Google-only fields.\n\nMethods\n-------\n\n### equals(@Nullable Object obj)\n\n public boolean equals(@Nullable Object obj)\n\n**Overrides** \n[Object.equals(Object)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-)\n\n### getApiMcycles() (deprecated)\n\n public long getApiMcycles()\n\n**Deprecated.** *This value is no longer meaningful.*\n\n### getAppEngineRelease()\n\n public String getAppEngineRelease()\n\n### getAppId()\n\n public String getAppId()\n\n### getAppLogLines()\n\n public List\u003cAppLogLine\u003e getAppLogLines()\n\n### getCombined()\n\n public String getCombined()\n\n### getCost()\n\n public double getCost()\n\n### getEndTimeUsec()\n\n public long getEndTimeUsec()\n\n### getHost()\n\n public String getHost()\n\n### getHttpVersion()\n\n public String getHttpVersion()\n\n### getInstanceKey()\n\n public String getInstanceKey()\n\n### getIp()\n\n public String getIp()\n\n### getLatencyUsec()\n\n public long getLatencyUsec()\n\n### getMcycles()\n\n public long getMcycles()\n\n### getMethod()\n\n public String getMethod()\n\n### getModuleId()\n\n public String getModuleId()\n\n### getNickname()\n\n public String getNickname()\n\n### getOffset()\n\n public String getOffset()\n\n### getPendingTimeUsec()\n\n public long getPendingTimeUsec()\n\n### getReferrer()\n\n public String getReferrer()\n\n### getReplicaIndex()\n\n public int getReplicaIndex()\n\n### getRequestId()\n\n public String getRequestId()\n\n### getResource()\n\n public String getResource()\n\n### getResponseSize()\n\n public long getResponseSize()\n\n### getStartTimeUsec()\n\n public long getStartTimeUsec()\n\n### getStatus()\n\n public int getStatus()\n\n### getTaskName()\n\n public String getTaskName()\n\n### getTaskQueueName()\n\n public String getTaskQueueName()\n\n### getUrlMapEntry()\n\n public String getUrlMapEntry()\n\n### getUserAgent()\n\n public String getUserAgent()\n\n### getVersionId()\n\n public String getVersionId()\n\n### hashCode()\n\n public int hashCode()\n\n**Overrides** \n[Object.hashCode()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--)\n\n### isFinished()\n\n public boolean isFinished()\n\n### isLoadingRequest()\n\n public boolean isLoadingRequest()\n\n### setApiMcycles(long apiMcycles)\n\n public void setApiMcycles(long apiMcycles)\n\n### setAppEngineRelease(String appEngineRelease)\n\n public void setAppEngineRelease(String appEngineRelease)\n\n### setAppId(String appId)\n\n public void setAppId(String appId)\n\n### setAppLogLines(List\\\u003cAppLogLine\\\u003e appLogLines)\n\n public void setAppLogLines(List\u003cAppLogLine\u003e appLogLines)\n\n### setCombined(String combined)\n\n public void setCombined(String combined)\n\n### setCost(double cost)\n\n public void setCost(double cost)\n\n### setEndTimeUsec(long endTimeUsec)\n\n public void setEndTimeUsec(long endTimeUsec)\n\n### setFinished(boolean finished)\n\n public void setFinished(boolean finished)\n\n### setHost(String host)\n\n public void setHost(String host)\n\n### setHttpVersion(String httpVersion)\n\n public void setHttpVersion(String httpVersion)\n\n### setInstanceKey(String instanceKey)\n\n public void setInstanceKey(String instanceKey)\n\n### setIp(String ip)\n\n public void setIp(String ip)\n\n### setLatency(long latency)\n\n public void setLatency(long latency)\n\n### setMcycles(long mcycles)\n\n public void setMcycles(long mcycles)\n\n### setMethod(String method)\n\n public void setMethod(String method)\n\n### setModuleId(String moduleId)\n\n public void setModuleId(String moduleId)\n\n### setNickname(String nickname)\n\n public void setNickname(String nickname)\n\n### setOffset(String offset)\n\n public void setOffset(String offset)\n\n### setPendingTime(long pendingTime)\n\n public void setPendingTime(long pendingTime)\n\n### setReferrer(String referrer)\n\n public void setReferrer(String referrer)\n\n### setReplicaIndex(int replicaIndex)\n\n public void setReplicaIndex(int replicaIndex)\n\n### setRequestId(String requestId)\n\n public void setRequestId(String requestId)\n\n### setResource(String resource)\n\n public void setResource(String resource)\n\n### setResponseSize(long responseSize)\n\n public void setResponseSize(long responseSize)\n\n### setStartTimeUsec(long startTimeUsec)\n\n public void setStartTimeUsec(long startTimeUsec)\n\n### setStatus(int status)\n\n public void setStatus(int status)\n\n### setTaskName(String taskName)\n\n public void setTaskName(String taskName)\n\n### setTaskQueueName(String taskQueueName)\n\n public void setTaskQueueName(String taskQueueName)\n\n### setUrlMapEntry(String urlMapEntry)\n\n public void setUrlMapEntry(String urlMapEntry)\n\n### setUserAgent(String userAgent)\n\n public void setUserAgent(String userAgent)\n\n### setVersionId(String versionId)\n\n public void setVersionId(String versionId)\n\n### setWasLoadingRequest(boolean wasLoadingRequest)\n\n public void setWasLoadingRequest(boolean wasLoadingRequest)\n\n### toString()\n\n public String toString()\n\n**Overrides** \n[Object.toString()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#toString--)"]]