public final class LogQueryResult implements Iterable<RequestLogs>An object that is the result of performing a LogService.fetch() operation. LogQueryResults contain the logs from the user's query. Users of this service should use the LogQueryResult#iterator provided by this class to retrieve their results.
Implements
Iterable<RequestLogs>Static Methods
parseOffset(String offset)
protected static LogServicePb.LogOffset parseOffset(String offset)Returns a LogOffset parsed from the submitted String, which is assumed to be a Base64-encoded offset produced by this class.
| Parameter | |
|---|---|
| Name | Description |
offset |
String |
| Returns | |
|---|---|
| Type | Description |
com.google.apphosting.api.logservice.LogServicePb.LogOffset |
A String to parse as a Base64-encoded LogOffset protocol buffer. |
Constructors
LogQueryResult(LogServicePb.LogReadResponse response, LogQuery originalQuery)
protected LogQueryResult(LogServicePb.LogReadResponse response, LogQuery originalQuery)| Parameters | |
|---|---|
| Name | Description |
response |
com.google.apphosting.api.logservice.LogServicePb.LogReadResponse |
originalQuery |
LogQuery |
Methods
iterator()
public Iterator<RequestLogs> iterator()Returns an Iterator that will yield all of the logs the user has requested. If the user has asked for more logs than a single request can accommodate (which is LogService.MAX_ITEMS_PER_FETCH), then this iterator grabs the first batch and returns them until they are exhausted. Once they are exhausted, a fetch() call is made to get more logs and the process is repeated until either all of the logs have been read or the user has stopped asking for more logs.
| Returns | |
|---|---|
| Type | Description |
Iterator<RequestLogs> |
An iterator that provides RequestLogs to the caller. |