Please note that the contents of this offline web site may be out of date. To access the most recent documentation visit the online version .
Note that links that point to online resources are green in color and will open in a new window.
We would love it if you could give us feedback about this material by filling this form (You have to be online to fill it)



The RequestLog Class

This class is a representation of the complete log data available for a single request, including all application logs for that request.

RequestLog is provided by the google.appengine.api.logservice module.

  1. Introduction
  2. Properties

Introduction

A large set of log data is written during the handling of a request. The RequestLog class contains all of this data with the different types of data represented as properties. Because one or more application logs can be written during the handling of an incoming client request, there is a property containing a list of AppLog objects, each of which contains one application log.

You don't instantiate this class. Instead, you obtain this information by invoking logservice.fetch() to get the filtered list of RequestLog objects, each of which contains all the log information for that request, incuding application logs. You then get the list of AppLog objects from each RequestLog object using the app_logs property to return a list of AppLog objects. (This list can be empty, if no app log was written during the request.)

Instance Properties

app_id
Returns the application id of the application that handled the request as a string.
app_logs
Returns a list of AppLog objects containing any log messages emitted by the application while serving this request, or an empty list if there were no application logs written.
api_mcycles
The number of machine cycles spent in API calls while processing request (or None if not available) as a long.
combined
Returns a string containing an Apache-style log line in the form documented at apache.org . This is the Apache combined log entry for request, which can be constructed from the rest of this message; however, this field is included for convenience.
cost
Returns a float value representing the estimated cost of this request in fractional dollars or None if not available.
end_time
Returns a float value representing the time at which the request completed expressed in seconds since the Unix epoch.
finished
Returns a bool indicating whether this log represents a finished request.
host
Returns a string containing the Internet host and port number of the resource being requested or None if not available.
http_version
Returns a string containing the HTTP version used in the request.
instance_key
Returns a string containing a mostly-unique identifier for the instance that handled the request, or None if not applicable.
ip
Returns a string containing the origin IP address of the 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.

latency
Returns a float value representing the time required to process the request in seconds.
mcycles
Returns an int value representing the number of machine cycles used to process the request.
method
Returns a string containing the request method (GET, PUT, POST, etc).
nickname
Returns a string containing the nickname of the user that made the request if known and logged-in or None otherwise.
offset
Returns a bytestring containing the binary offset indicating the current position in the active result stream. This value may be submitted to subsequent logservice.fetch() requests (with all other parameters identical except for the offset) to continue reading logs starting immediately after this request.
pending_time
Returns a float value representing the amount of time in seconds that this request spent in the pending request queue.
referrer
Returns a string containing the Referrer URL of the request or None if not applicable.
replica_index
Returns an int representing the server replica that handled the request, or None if not applicable.
request_id
Returns a bytestring containing the globally unique identifier for a request, based on request start time. Request ids for requests that started later will compare greater as binary strings than those for requests which started earlier.
resource
Returns a string containing the resource path on the server requested by the client (the path component of the request URL). For example, http://nowhere.com/app would have a resource string of '/app'.
response_size
Returns a long value representing the size in bytes sent back to the client by the request.
start_time
Returns a float value representing the time at which the request began processing expressed in seconds since the Unix epoch.
status
Returns an int value representing the response status of the request.
task_name
Returns a string containing the request's task name, if this generated via the Task Queue API, or None otherwise.
task_queue_name
Returns a string containing the request's queue name, if generated via the Task Queue API, or None otherwise.
url_map_entry
Returns a string containing the file or class within the URL mapping used for the request. Useful for tracking down the source code which was responsible for managing the request, especially for multiple-mapped handlers.
user_agent
Returns a string containing the user agent used to make the request or None if not applicable.
version_id
Returns a string containing the version of the application that handled the request.
was_loading_request
Returns a bool indicating whether this request was a loading request for an instance.

Authentication required

You need to be signed in with Google+ to do that.

Signing you in...

Google Developers needs your permission to do that.